JSON
JavaScript Object Notation - the universal language for structured data exchange.
JSON (JavaScript Object Notation) is a lightweight data interchange format derived from JavaScript object literal syntax. It became standardized as ECMA-404 in 2013 and RFC 8259 in 2017.
Syntax
JSON uses curly braces for objects, square brackets for arrays, colons for key-value pairs, and commas for separation:
{
"name": "Claude",
"type": "assistant",
"capabilities": ["reasoning", "coding", "analysis"],
"parameters": {
"temperature": 0.7,
"maxTokens": 4096
}
}JSON supports six data types: strings, numbers, booleans, null, arrays, and objects.
Use in AI Systems
Large language models parse and generate JSON reliably. Training data contains extensive JSON from API responses, configuration files, and data exports. This makes JSON the standard format for structured LLM output.
For agent clouds, JSON provides deterministic (predictable, repeatable) interfaces between probabilistic (statistically variable) components:
{
"action": "execute_task",
"task_id": "commission_calc_001",
"inputs": {
"file_path": "/data/commissions.xlsx",
"period": "Q4_2024"
},
"validation": {
"schema": "commission_output_v2",
"strict": true
}
}Limitations
JSON has several constraints. The specification does not support comments. Validation requires external JSON Schema tooling since no schema mechanism is built in. Binary data must be Base64 encoded, which increases size. The syntax is strict and does not allow trailing commas.
Validation
JSON Schema provides external validation including type checking for values, required field enforcement, pattern matching for strings, and range constraints for numbers.
Structured Output in AI Systems
JSON serves as a contract layer between AI models and application code. Developers define schemas for model input, define schemas for expected output, and validate model responses against those schemas.
This pattern wraps probabilistic AI behavior in deterministic validation. Invalid JSON or schema mismatches are caught before affecting downstream systems.