Json and Geojson

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.