1 , JSON Introduction
JSON (JavaScript Object Notation) is a lightweight data interchange format. Simply put, JSON can convert a set of data represented in a JavaScript object into a string, which can then be easily passed between functions, or in an asynchronous application passing a string from a WEB client to a server-side program. The string looks a bit odd, but JavaScript is easy to explain, and JSON can represent a more complex structure than a name/value pair.
The JSON syntax is a subset of the JavaScript object representation syntax.
Data in key-value pairs
Data is separated by commas
Curly braces Save Object
Square brackets Save Array
The writing format for JSON data is: name/value pairs. Names in name/value pairs are written in front (in double quotes), value pairs are written behind (also in double quotes), separated by colons: "FirstName": "John", which is easy to understand, equivalent to this JavaScript statement: firstname= "John"
2 , Geojson Introduction
Geojson is a format for encoding various geographic data structures, based on the representation of JavaScript objects in Geospatial Information Data Interchange format. A Geojson object can represent a geometry, feature, or feature set. The Geojson supports the following geometry types: Point, line, Polygon, multipoint, multiline, faceted, and geometric collections. The features in the Geojson contain a geometric object and other attributes, which represent a series of features.
A complete Geojson data structure is always an object (in JSON terminology). In Geojson, an object consists of a set of name/value pairs-also known as members. For each member, the name is always a string. The value of a member is either a string, a number, an object, an array, or one of the following literal constants: "true", "false", and "null". The array contains values that are composed of the above mentioned elements.
Here is an example:
Http://www.tuicool.com/articles/zeInue
Json and Geojson