JSON is supposed to be a “better mousetrap” for data
exchange. Let’s understand what it is first.
JSON was standardized both as part of the IETF (Internet
Engineering Task Force) RFC (Request for Change) process (RFC 7159) and the
ECMA (European Computer Manufacturers Association) specification ECMA-262
and ISO/IEC 16262. The JSON schema was defined in an IETF draft that expired in
August 2013.
XML has detailed
specifications that are vague in spots which has led to inconsistent
implementations. JSON has almost no standardization and a handful of
implementation inconsistencies also. I
guess that the lesson is that good faith partners can work together and make
good thinks happen.
There is a simplified MISMO BORROWER structure in Figure 1
BORROWER Model.
It has enough in it for use to explore how to represent this in JSON.
- Optional Data
- List of Aliases that is unbounded in length.
- A variety of data types
o
String
o
Date
o
Boolean
o
Enumerated.
- The NAME structure under both BORROWER and ALIAS
Figure 1 BORROWER Model
There
is an example XML that is valid with respect to the schema in Figure
1 BORROWER Model in the file named BORROWERExample.xml in the ZIP file
named JSONExamples.ZIP located here.
Using
an XSD to JSON Schema conversion tool from Altova I made a JSOM Schema from our
example BORROWER in Figure
1 BORROWER Model. In the ZIP
mentioned above it is the file named BORROWER.json. Altova XMLSPy can also show
the JSON model
Figure 2
BORROWER Model in JSON Schema
In the ZIP file
you will also find a JSON example that fits the model derived from the XML
schema.
Conclusion
The MISMO model
can be used to in JSON applications after casting the schema into JSON schema.
Since is a popular to use JSON as the data carrier between a Web Server and the
page rendering in a browser it is unlikely that you will need the entire MISMO
RM cast into JASON. But you could assert name, definition, data type and
cardinality consistency between the data enter or presentation UI and the
model. We saw in a previous blog that we could instantiate a data at rest SQL
database directly from the MISMO RM. Your Web application could use that DB to
store data received from a data entry or edit UI. We could exchange data via
Web Services with our legacy COBOL/DASD based systems.
In this series of
blogs ( “We Cannot”, “DB Myth Busted”, “COBOL Myth Busted” and this one we have demonstrated that we COULD
build systems that use the MISMO vocabulary and reference model using the
technologies many companies use and integrate it with the tools of theirlegacy
systems.
No comments:
Post a Comment