L2 Hub
Pontus
formatters
Stringify

L2 Construct: stringify

formatters stringify

Description

StringifyEndpoint takes an arbitrary object and converts it into a string representation. It handles various types including primitives, structs, maps, and slices.

L2 Data

  1. Provider: pontus
  2. Module: formatters
  3. Action: stringify

Example Step

{
  "name": "insert-your-step-name",
  "type": "l2",
  "l2_data": {
    "provider": "pontus",
    "module": "formatters",
    "action": "stringify"
  }
}
 

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"]
    }
  }
}