JSON (JavaScript Object Notation)
JSON (JavaScript Object Notation) est un format d'échange de données léger et lisible par l'homme. Dérivé de la syntaxe littérale des objets JavaScript, il est indépendant du langage et est devenu le format dominant pour les API web, les fichiers de configuration et le stockage de données.
Type MIME
application/json
Type
Texte
Compression
Sans perte
Avantages
- + Human-readable and writable with minimal syntax
- + Native parsing in every programming language
- + Dominant format for REST APIs and web services
- + Lightweight — less verbose than XML
Inconvénients
- − No comment syntax — cannot annotate configuration files
- − No native date, binary, or schema types
- − Trailing commas cause parse errors in strict parsers
Quand utiliser .JSON
Utilisez JSON pour les réponses d'API, les fichiers de configuration (package.json, tsconfig.json), le stockage de données et l'échange entre services. Privilégiez YAML lorsque la lisibilité humaine et les commentaires sont prioritaires.
Détails techniques
JSON prend en charge six types de données : chaîne, nombre, booléen, null, objet et tableau. Encodé en UTF-8 par défaut. Pas de commentaires, pas de virgule finale. La taille maximale n'est pas spécifiée mais les analyseurs imposent généralement des limites pratiques.
Historique
Douglas Crockford a spécifié JSON au début des années 2000 comme une alternative légère à XML. Il a été formalisé dans la RFC 7159 (2014) puis la RFC 8259 (2017). L'adoption rapide de JSON a été portée par AJAX et les API RESTful.
Convertir depuis .JSON
Convertir en .JSON
Formats associés
Termes associés
Learn More
File Format Conversion: A Complete Guide
Converting files between formats is a daily task for professionals across every industry. This comprehensive guide covers document, image, audio, …
How to Generate Strong Random Passwords
Password generation requires cryptographic randomness and careful character selection. This guide covers the principles behind strong password generation, entropy calculation, …
JSON vs YAML vs TOML: Choosing a Configuration Format
Configuration files are the backbone of modern applications. JSON, YAML, and TOML each offer different trade-offs between readability, complexity, and …
Meta Tags for SEO: Title, Description, and Open Graph
Meta tags control how your pages appear in search results and social media shares. This guide covers the essential meta …
Text Encoding Explained: UTF-8, ASCII, and Beyond
Text encoding determines how characters are stored as bytes. Understanding UTF-8, ASCII, and other encodings prevents garbled text, mojibake, and …
CSV vs JSON vs XML: Data Exchange Formats Compared
Data exchange formats serve different needs. CSV excels at tabular data, JSON dominates web APIs, and XML powers enterprise integrations. …