x402

Flatten JSON (x402)

Flatten nested JSON to dot-notation keys. E.g. {a:{b:[1,2]}} → {'a.b.0':1,'a.b.1':2}. Configurable delimiter and array handling. Algorithmic.

get/x402/v2/flatten-json

Request

  • Base URL: https://api.strale.io
  • URL: https://api.strale.io/x402/v2/flatten-json
  • Auth: none required

Query parameters

dataunknown required
delimiterstring

Default '.'

array_handlingstring

'index' or 'stringify'

Response

Success

flattenedobject
key_countinteger
max_depth_foundinteger

Example response

{
  "delimiter": ".",
  "flattened": {
    "user.name": "John",
    "user.address.city": "Stockholm"
  },
  "key_count": 2,
  "array_handling": "index",
  "max_depth_found": 3
}

Changes

No recorded changes to this operation across all 1 revision of this API.