JSON

From air
Revision as of 15:26, 15 September 2016 by Donsez (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

JSON (JavaScript Object Notation)

http://www.json.org/

API

Java

http://code.google.com/p/google-gson/

Javascript & Node.js

    var vcard = {
  		lastname: "DONSEZ",
  		firstname: "Didier",
  		birthday: new Date(),
  		email: "dd@moi.org",
                phones: ["+33 123456789", "+33 653456789"], 
	};
    
    var message = JSON.stringify(vcard);

    var vcard2 = JSON.parse(message);