//The essence of JSON

The essence of JSON

JSON means JavaScript Object Notation. It is an open source text base standard for data exchange. Primary usage of JSON is to transmit data between web browsers and servers as alternative of XML.

Syntax rules

  • Data is a key-value pair (also reffered to as property) separated by a comma. Keys are always strings.
  • Curly brackets hold objects
  • Square brackets hold arrays

Data types

  • String
  • Object
  • Number
  • Array
  • Boolean

Example

{
    "example_string":"This is string",
    "example_date":"2018-12-12 00:00:00",
    "example_number:1,
    "example_number2":3.65,
    "example_boolean":true,
    "example_array":["element1","element2"],
    "example_object":{
        "property1":"data1",
        "property2":data2"
    },
    "example_null":null
}

In the example above you can see a JSON object with properties of different types. Important to note is that the date is presented as a string and not as different data type.

By |2018-12-23T17:26:24+00:00January 8th, 2019|Categories: Explained Simply|Tags: |0 Comments

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

We use cookies on this site to improve our service, perform analytics and remember website preference. By using the site, you consent to these cookies. I consent to cookies