JSON(JavaScript Object Notation)
JSONは、人間が読み書きしやすく、マシンが解析・生成しやすい軽量なデータ交換フォーマットです。Web API、設定ファイル、現代のアプリケーションにおけるデータ保存の主要フォーマットです。
MIMEタイプ
application/json
種類
テキスト
圧縮
無劣化
メリット
- + 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
デメリット
- − No comment syntax — cannot annotate configuration files
- − No native date, binary, or schema types
- − Trailing commas cause parse errors in strict parsers
.JSONを使うタイミング
APIレスポンス、設定ファイル、サービス間のデータ交換、人間が読める構造化データにJSONを使用してください。
技術的詳細
JSONは6つのデータ型をサポートします:文字列、数値、ブーリアン、null、配列、オブジェクト(キー・バリューマップ)。UTF-8エンコーディングを使用し、コメント、日付、バイナリデータのネイティブサポートはありません。
歴史
Douglas Crockfordは2000年代初頭にJavaScriptオブジェクトリテラル構文からJSONを普及させました。2013年にECMA-404、2017年にRFC 8259として標準化され、ユニバーサルなAPIデータフォーマットとなりました。
.JSONから変換
.JSONに変換
関連フォーマット
関連用語
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. …