博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
JSON AND BSON
阅读量:6234 次
发布时间:2019-06-21

本文共 2255 字,大约阅读时间需要 7 分钟。

JSON

JavaScript Object Notation (JSON) is an open, human and machine-readable standard that facilitates data interchange, and along with XML is 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.  such as MongoDB use JSON documents in order to store records, just as tables and rows store records in a relational database. Here is 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 be 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 be efficient for encoding and decoding within different 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 can even "reach inside" BSON objects to build indexes and match objects against query expressions on both top-level and nested BSON keys. This means that MongoDB gives users the ease of use and flexibility of JSON documents together with the speed and richness of a lightweight binary format.  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.

转载于:https://www.cnblogs.com/ghgyj/p/4020363.html

你可能感兴趣的文章
Improving (network) I/O performance ...
查看>>
sql server 2008 不允许保存更改,您所做的更改要求删除并重新创建以下表 的解决办法...
查看>>
innodb的文件组成
查看>>
云计算信任危机下的不安
查看>>
罗永浩:锤子起死回生在 2017,现在是抢手“香饽饽儿”
查看>>
MHA failover GTID 专题
查看>>
如何在windows中使用cmd命令去编译,运行C++程序
查看>>
《机器人自动化:建模、仿真与控制》——导读
查看>>
BitTorrent可被用来放大拒绝服务攻击
查看>>
Web 缓存欺骗攻击技术详解
查看>>
容器网络方面的挑战和要求
查看>>
晶澳与马士基强强联合 全球业务进一步升级
查看>>
希捷固态硬盘:另类主控重出江湖
查看>>
来自编程“老者”们的须时刻谨记的七大教训金典
查看>>
漫谈深度学习 这个领域有点火!
查看>>
探究OpenShift市场:广度与深度
查看>>
如何使用SilentCleanup绕过UAC?
查看>>
开放容器计划能否改善容器安全性?
查看>>
任性AWS 大范围升级进行时
查看>>
医学影像大数据与智能医疗
查看>>