JSON and BSON

Source: Internet
Author: User

Json

JavaScript Object Notation (JSON) is an open, human and machine-readable standard that facilitates data interchange, and a Long with XML was the main format for data interchange used on the modern web. JSON supports all the basic data types you ' d expect:numbers, strings, and Boolean values, as well as arrays and hashes. Document databases such as MongoDB use JSON documents on order to store records, just as tables and rows store records in A relational database. Here's an example of a JSON document:

{"_id": 1,"name": {"First": "John", "Last": "Backus" },"contribs": ["Fortran", "ALGOL", "Backus-naur Form", "FP" ],"awards" : [           {             "award": "W.W. McDowell Award",             "year ": 1967,             " by ":" IEEE Computer Society "           },           " award ":" Draper Prize ",             ' Year ': 1993,             ' by': ' National Academy of Engineering '           }]}

A JSON Database Returns query results that can is easily parsed, with little or no transformation, directly by JavaScript And most popular programming languages–reducing the amount of logic you need to build into your application layer.

Binary JSON (BSON)

MongoDB represents JSON documents in binary-encoded format called BSON behind the scenes. BSON extends the JSON model to provide additional data types and to is efficient for encoding and decoding within Differen T languages.

MongoDB, BSON, and JSON

The MongoDB BSON implementation is lightweight, fast and highly traversable. Like JSON, MongoDB's BSON implementation supports embedding objects and arrays within other objects and Arrays–mongodb C An even "reach inside" BSON objects to build indexes and match objects against query expressions on both top-level and NES Ted BSON keys. This means, MongoDB gives users the ease of use and flexibility of JSON documents together with the speed and richness of a lightweight binary format. Read Our MongoDB overview To learn more about these features.

Free Whitepaper:mongodb Architecture Guide

In this introductory technical paper, you ll learn:

    • The architecture of MongoDB.
    • How MongoDB builds and runs applications today.
    • MongoDB ' s document Data model, query model, data management, consistency, durability, availability and performance.

JSON and BSON

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.