JSON

Introduction

JSON stands for JavaScript Object Notation.

Basics

  • Use curly braces { } to define objects.
  • Use name:value pairs inside an object to define properties.
  • Use brackets [ ] to define arrays.

Methods

Language EncodeĀ to JSON DecodeĀ from JSON
JavaScript JSON.stringify() JSON.parse()
PHP json_encode() json_decode()

XML or JSON?

Both are valid options, XML is the more mature technology but JSON is more concise. Currently JSON seems to be favored.

Bibliography / Further Reading

%d bloggers like this: