{"uid":"cap_Q0-04eEF4hJi8KcUehV2d","slug":"fittings-json-flatten-8336cb94","name":"fittings JSON Flatten","description":"Flatten arbitrarily nested JSON to a single-level object of dotted paths, or expand one back.","url":"https://fittings.sh/v1/fmt/json-flatten","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"json":{"type":"object","description":"Any JSON value, up to 50000 leaves, 1000000 key characters and 64 levels deep"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_H29RVIFuWeBptMuG0saOj","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Flattens arbitrarily nested JSON into a single-level object with dotted-path keys, or expands a flat dotted-path object back into nested JSON.","exampleAgentPrompt":"Flatten this deeply nested JSON object into a single-level object using dotted paths: {\"user\":{\"address\":{\"city\":\"Austin\",\"zip\":\"78701\"},\"name\":\"Alice\"}}.","exampleUseCases":[{"title":"Normalize nested API response","prompt":"I got this deeply nested JSON back from a third-party API and I need to flatten it to dotted paths so I can store it in a flat key-value store — can you flatten it for me?"},{"title":"Prepare nested config for environment variables","prompt":"Take this nested JSON config object and flatten it to dot-notation keys so I can map each field to an environment variable name."},{"title":"Expand flat dotted keys to nested JSON","prompt":"I have a flat object with dotted keys like 'user.address.city' and 'user.name' — can you expand it back into a proper nested JSON structure?"}],"resultDescription":"A single-level JSON object where each key is a dotted path representing the full depth of the original nesting (e.g. {\"user.address.city\": \"Austin\"}), or the inverse: a fully reconstructed nested JSON object from dotted-path keys. Supports up to 50,000 leaves, 1,000,000 key characters, and 64 levels of depth.","failureModes":["Input JSON exceeds 50,000 leaf nodes — returns error","Nesting depth exceeds 64 levels — returns error","Total key characters exceed 1,000,000 — returns error","Malformed JSON input — returns parse error","Empty or missing 'json' field in request body — returns validation error"],"whenToPreferThis":"Use this endpoint when you need a reliable, hosted, pay-per-call JSON flattening or unflattening operation without deploying your own code. Ideal for agents processing arbitrarily nested API responses, config objects, or database documents that need to be normalized for flat storage, CSV export, or environment variable mapping. Prefer this over a custom implementation when the nesting depth or leaf count is large and correctness matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:42:06.506Z","isFirstParty":false}