{ "version": "1.0.0", "generated_for": "typed-bracket-path-v1", "contract": { "root_types": [ "object", "array" ], "max_depth": 32, "object_key_rule": "bare ASCII keys are object keys; array indexes are always numeric brackets; unsafe object keys are JSON strings inside brackets", "empty_containers": "empty objects and arrays are terminal values when preserve_empty is enabled", "conflicts": "strict error; never overwrite or merge scalar/container conflicts" }, "cases": [ { "id": "plain_nested", "operation": "round_trip", "input": { "user": { "name": "Ada", "address": { "city": "London", "zip": "SW1A" }, "tags": [ "admin", "active" ] }, "version": 1 }, "expected": "lossless" }, { "id": "arrays_of_objects", "operation": "round_trip", "input": { "items": [ { "sku": "a1", "qty": 2 }, { "sku": "b7", "qty": 1 } ], "currency": "EUR" }, "expected": "lossless" }, { "id": "empty_containers", "operation": "round_trip", "input": { "empty_obj": {}, "empty_arr": [], "nested": { "also_empty": {} }, "x": 1 }, "expected": "lossless" }, { "id": "numeric_object_keys", "operation": "round_trip", "input": { "123": "zip", "nested": { "456": "id", "007": "bond" } }, "expected": "lossless" }, { "id": "delimiter_in_key", "operation": "round_trip", "input": { "a.b": { "c.d": 1 }, "normal": 2 }, "expected": "lossless" }, { "id": "square_brackets_in_key", "operation": "round_trip", "input": { "arr[0]": "literal key", "x": { "ends]": true } }, "expected": "lossless" }, { "id": "quotes_and_backslash_in_key", "operation": "round_trip", "input": { "quote\"key": 1, "back\\slash": 2 }, "expected": "lossless" }, { "id": "unicode_keys", "operation": "round_trip", "input": { "usuario": { "ciudad": "São Paulo" }, "emoji🚀": true }, "expected": "lossless" }, { "id": "empty_string_key", "operation": "round_trip", "input": { "": "empty", "nested": { "": 0 } }, "expected": "lossless" }, { "id": "prototype_pollution_keys", "operation": "round_trip", "input": { "__proto__": { "polluted": false }, "constructor": { "prototype": "literal key" } }, "expected": "lossless" }, { "id": "root_array", "operation": "round_trip", "input": [ { "x": 1 }, { "y": 2 }, [ "z" ] ], "expected": "lossless" }, { "id": "explicit_null_array", "operation": "round_trip", "input": { "arr": [ 1, null, 3 ] }, "expected": "lossless" }, { "id": "scalar_leaves", "operation": "round_trip", "input": { "text": "hello", "integer": 42, "decimal": 2.5, "yes": true, "no": false, "nothing": null }, "expected": "lossless" }, { "id": "deep_nesting_within_limit", "operation": "round_trip", "input_spec": { "kind": "chain", "depth": 24, "leaf": "bottom" }, "expected": "lossless" }, { "id": "depth_limit_exceeded", "operation": "round_trip", "input_spec": { "kind": "chain", "depth": 33, "leaf": "too deep" }, "expected": "error" }, { "id": "circular_reference", "operation": "round_trip", "input_spec": { "kind": "circular" }, "expected": "error" }, { "id": "root_scalar", "operation": "round_trip", "input": 42, "expected": "error" }, { "id": "root_empty_object", "operation": "round_trip", "input": {}, "expected": "error" }, { "id": "conflict_parent_scalar", "operation": "unflatten", "flat_input": { "a": 1, "a.b": 2 }, "expected": "error" }, { "id": "conflict_container_type", "operation": "unflatten", "flat_input": { "a[0]": 1, "a.b": 2 }, "expected": "error" }, { "id": "sparse_index_gap", "operation": "unflatten", "flat_input": { "arr[0]": 1, "arr[2]": 3 }, "expected": "error" }, { "id": "nonterminal_nested_value", "operation": "unflatten", "flat_input": { "a": { "b": 1 } }, "expected": "error" } ] }