L2 Construct: string
formatters string_formatterDescription
StringifyEndpoint takes an arbitrary object and converts it into a string representation. It handles various types including primitives, structs, maps, and slices.
L2 Data
- Provider: pontus
- Module: formatter
- Action: string
Example Step
{
"name": "insert-your-step-name",
"type": "l2",
"l2_data": {
"provider": "pontus",
"module": "formatter",
"action": "string",
"metadata": {}
}
}
Input
Example
{
"object": {
"age": 30,
"email": "john@example.com",
"name": "John Doe"
}
}
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pontus.bpa/pkgs/l2/pontus/formatters/stringify-input",
"$ref": "#/$defs/StringifyInput",
"$defs": {
"StringifyInput": {
"properties": {
"object": true
},
"additionalProperties": false,
"type": "object",
"required": ["object"]
}
}
}
Output
Example
{
"result": "{\"age\":30,\"email\":\"john@example.com\",\"name\":\"John Doe\"}"
}
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pontus.bpa/pkgs/l2/pontus/formatters/stringify-output",
"$ref": "#/$defs/StringifyOutput",
"$defs": {
"StringifyOutput": {
"properties": {
"result": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": ["result"]
}
}
}