![]() Hence, the need for a schema became evident in the JSON world and voila – JSON Schema enters the picture.īesides the related debate, as for certain people/situations the use of schema does not seem to make sense, the approach to using JSON Schema is different than the one to using XML Schema. But for a big part of real-life situations this set of conditions is simply not possible to meet and the situation will sooner or later escalate to a maintenance nightmare. This approach may work when the exchanged structures are simple and stable and the parties in charge of the two points that communicate are able to sync and maintain a common understanding of the shared data objects without a formal specification. a schema) may seem like a benefit at first, but that is not necessarily the case. ![]() Of course it was not long before people realized that the lack of a contract to specify the structure of data exchanged between two points (i.e. As JSON has originally evolved as a serialization format for Javascript, this mirrors its primary context of use. It is also considered more lightweight than XML in terms of serialization, as it is less verbose. JSON is typically perceived as a format whose main advantage is that it is simple and lean: it can be used without knowing or caring about any underlying schema, happily hacking away setting and getting values. ![]() So before proceeding to explain why this ain’t neccessarily so, let us first see what are the options for modeling in the XML and the JSON world respectively. For most people a SOAP API is associated with an XML data model, while a REST API is associated with a JSON data model. In the second part of this series of posts we start looking into the implications of the choice between a SOAP and a REST approach to implementing APIs from a data modeling perspective. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |