JSON GUIDE · 3 MIN READ
Understand JSON objects and field paths
Use named properties, distinguish missing from null, and handle punctuation in keys.
Names are strings
An object associates property names with values. Names can contain spaces, dots, slashes, and Unicode; a dot in a name does not itself create a nested object. Compare a key literally named address.city with a city key inside an address object.
Use unique names within each object. Reusing a name creates interoperability problems because parsers can discard an earlier member. A tree of parsed data cannot recover a member that the parser has already replaced.
{"address.city":"literal key","address":{"city":"nested value"},"optional":null}Choose an unambiguous path
JSON Pointer uses / between path segments, ~1 for a literal slash, and ~0 for a literal tilde. A JSONPath bracket selector can also select a name containing punctuation. Flattening needs its own escaping convention; do not interchange these path syntaxes.
Selecting or omitting fields changes shape. An absent optional field is not equivalent to one present with null, and removing empty objects may change how a downstream schema validates the document. Compare the preview with the original and validate against your contract afterward.

