What is BSON and exactly how is it different from JSON?

前端 未结 7 878
-上瘾入骨i
-上瘾入骨i 2021-01-29 19:03

I am just starting out with MongoDB and one of the things that I have noticed is that it uses BSON to store data internally. However the documentation is not exactly clear on wh

相关标签:
7条回答
  • 2021-01-29 19:23

    MongoDB represents JSON documents in binary-encoded format so we call it BSON behind the scenes.

    BSON extends the JSON model to provide additional data types such  as Date and binary which are not supported in JSON also provide ordered fields in order for it to be efficient for encoding and decoding within different languages. 

    In other word we can say  BSON is just binary JSON ( a superset of JSON with some more data types, most importantly binary byte array ).

    Mongodb using as a serialization format of JSON include with encoding format for storing and accessing documents. simply we can say BSON is a binary encoded format for JSON data.

    for more mongoDB Article : https://om9x.com/blog/bson-vs-json/

    0 讨论(0)
提交回复
热议问题