BSON (Binary JSON) is the data format used by popular MongoDB NoSQL database. It’s similar to JSON but designed for efficient storage and scanning. Unlike JSON, BSON is a binary format that is not human-readable by default. BSON’s binary structure encodes type and length information, which allows it to be parsed much more quickly than straight JSON. Since its initial formulation, BSON has been extended to add some optional non-JSON-native data types, like dates and binary data, which are essential for MongoDB.
XMLSpy includes a powerful graphical JSON Schema editor with built-in support for defining BSON datatypes.
MongoDB provides the ability to validate database data against a JSON schema document. Because BSON datatypes supplement the standard JSON types, XMLSpy provides an editing layer for BSON that lets you add and modify BSON-specific schema features during JSON Schema development.
When you enable BSON support in JSON Schema View, BSON datatypes become available for JSON objects, properties, and array items. When a component's base type has been selected to be BSON, the BSON types become available for selection.
Support for BSON in the XMLSpy graphical JSON schema editor helps teams enable validation of real-world BSON data for MongoDB and other applications.
MongoDB is schema-less by default, but real-world apps often need to validate the structure and types of data being stored. That’s where JSON Schema comes in, and support for BSON in XMLSpy makes it easy to implement.
A real world example of where this support is important is a development team working on a healthcare app uses MongoDB to store patient records. They want to:
With XMLSpy, they can:
With its visual schema design paradigm, developers can get the job done quickly and with fewer errors. An optional final step is to use Altova MapForce to map, transform, and integrate the MongoDB data with other systems like SQL databases and XML reports.