レッスン 3

JSON Data Types 日本語ガイド

日本語の json json data types ガイド: Strings, numbers, booleans, null, and what JSON deliberately excludes.

このコンテンツはまだ日本語で用意されていません。ローカライズが完了するまで English 版を表示しています。

JSON supports exactly six kinds of values. There are no dates, functions, or undefined—only what can be represented literally in text.

1. String

Text in double quotes. Escape sequences include \", \\, \n, \t, and \uXXXX for Unicode.

"message": "Hello, \"world\"!"

2. Number

JSON numbers are decimal; no NaN or Infinity. No leading plus on integers is required; fractions and exponents are allowed.

"count": 42,
"ratio": 0.75,
"large": 1.2e6

3. Boolean

Literals true or false (lowercase, unquoted).

"enabled": true

4. null

The literal null means “no value” or “empty” in many APIs—not the string "null".

"middleName": null

5. Object

Unordered collection of key–value pairs (order may be preserved by parsers but should not be relied on for semantics).

6. Array

Ordered list of values, indexed from zero in host languages after parsing.

What JSON does not include

Not in JSONCommon workaround
undefinedOmit the key or use null
DateISO 8601 string: "2026-05-22T10:00:00Z"
Map, SetArrays or objects
CommentsExternal docs or "_comment" fields (non-standard)
Single-quoted stringsUse double quotes

Understanding these limits prevents confusion when mapping JSON to strongly typed application models.

実践したいときは関連する DevCove ツールを使えます。任意であり、このレッスンの必須部分ではありません。

関連ツールを開く

コース概要へ戻る