How do I format a small nested object and see its key count and depth?
- JSON Text
- {"a":1,"b":{"c":2}}
- Action
- Format (Pretty Print)
- Enter {"a":1,"b":{"c":2}} with Action set to Format (Pretty Print).
- Parsing succeeds, so Validation is VALID ✓. Keys a, b and c give Total Keys 3; depth reaches the nested value, giving 2; Root Type is Object.
- The output is the same object with two-space indentation across multiple lines.
- Validation
- VALID ✓
- Total Keys
- 3
- Nesting Depth
- 2
- Root Type
- Object
- Formatted JSON
- { "a": 1, "b": { "c": 2 } }
Key count includes nested keys, and depth counts levels below the root. Formatting does not change values or the parsed key order. This sample keeps its values; that does not guarantee lossless serialization for arbitrary JSON.
