16
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

JSONとJSオブジェクトの違い

Last updated at Posted at 2019-01-12

#JSオブジェクト

キーをダブル、シングルコーテーションで囲っても囲わなくても良い & 文字列をダブル、シングルクォーテーションで囲む。(数字型の場合は囲わなくてOK)
{ 
    jsonId: 0,
    jsonName: "namename", ←末尾のカンマは使用できる。
}

#JSON

キーをダブルクオーテーションで囲む & 文字列をダブルクォーテーションで囲む。 (数字型の場合は囲わなくてOK)
{ 
    "jsonId": 0,
    "jsonName": "namename" ←末尾のカンマは使用できない。
}

※JSONでは undefined が使えない。

16
10
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?