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

LanguageEncode to JSONDecode from JSON
JavaScriptJSON.stringify()JSON.parse()
PHPjson_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: