AI Newsway
Back to glossary

JavaScript Object Notation

Data

JSON, or JavaScript Object Notation, is a lightweight text format for exchanging structured data. It represents values as objects of key-value pairs, arrays, strings, numbers, booleans, and null, using a syntax borrowed from JavaScript but supported by every mainstream language. The format is readable by people and cheap for machines to parse, which is why it became the default for web APIs, configuration files, and log records. A REST endpoint typically accepts a JSON request body and returns a JSON response, and libraries convert between JSON text and native objects in a single call. In AI work, JSON is how tool definitions, function arguments, and structured model output are expressed, and providers offer schema-constrained modes so a model returns parseable data instead of prose. The limits are practical. JSON has no comment syntax, no native date or binary type, and very large numbers can lose precision when parsed as floating point, so YAML and TOML cover configuration and formats such as Protocol Buffers cover high-volume binary transfer. Trusting incoming JSON without validating it against a schema is a common source of runtime errors, which is why validators such as Zod and Pydantic are standard in production code.