A Short Introduction to JSON

Much like XML, JSON is a recursive structure with a root object (represented by an opening and closing curly brace (‘{‘ and ‘}’). This root object can contain named strings, numbers, objects, and arrays. A simple object specification follows:

{

"head": {

"signature": xxxx,

"transaction": "xxxxyyyy",

"environment": {

}

"fields": [

]

},

"data": [ ]

}

This declaration declares an object that contains two empty sub-objects, head, and data. In a JavaScript program, a string in this format can be easily parsed using the Eval() function or the newer ParseJSON() function. Once parsed, the data contained therein can be accessed using standard JavaScript notation.