Recent
update in Information Server 9.2 containing JSON parsing/composing
(added into Assembly Editor for hierarchical transformation of new
JSON docs). JSON (JavaScript Object Notation) prominent is an
alternative to XML in the world of data interchange. JSON is a text
format that is completely language independent but uses conventions
that are familiar to programmers of the C-family of languages,
including C, C++, C#, Java, JavaScript, Perl, Python, and many
others. These properties make JSON an ideal data-interchange
language. JSON
(JavaScript Object Notation) is a lightweight data-interchange
format.
More
about JSON
JSON is the preferred format in “NoSQL” databases. These databases are intended to accommodate massive scalability, designed to deal with data that often does not seamlessly conform to a columnar/relational model, and to be web-oriented at their very core. The most well-known examples of databases of this sort are MongoDB, CouchDB, and Riak. These three are JSON-based, horizontally scalable, and deeply web-driven databases. Also Amazon’s DynamoDB is REST/JSON architecture. Neo4J data base has a REST/JSON API, with no corresponding XML support.
There
are a few databases that are XML-based such as MarkLogic, but JSON is
more in demand because of its versatile features. There are rapid
adoptions of JSON-based storage models.
JSON
is specifically for serializing data structures. XML can also
represent data structures, JSON is much better at describing data
structures. JSON on the other hand is mismatched to describe semantic
meaning behind text in documents, which is where XML excels. XML
originated as a way to give semantic definition to text in documents.
JSON
is built on two structures:
- A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
- An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
Selection
between JSON and XML
The requirements of your connection client and the type of data you need to serialize are the main aspect that drives the decision between using XML and JSON. The web service’s APIs have become very important to the web. On top of that, REST is replacing SOAP as a data transfer protocol. XML is not compatible with REST, so if SOAP continues its decline, then XML usage will shrink along with it. REST and SOAP both are different protocols for “How to access Web-Services”
(Differences
in REST and SOAP:
http://blog.smartbear.com/apis/understanding-soap-and-rest-basics/
)
JSON with Web-Services
As
we all know JavaScript is robust and most accepted technology for
almost all web services. JSON is better adapted than XML to devices
with limited capabilities. As JSON is derived from javascript, it is
ideal for integration into web as per our current “Internet
Architecture”. Of course there’s an XML parser for node, but it’s
largely geared toward dealing with legacy XML-based endpoints. There
are few limitations with JSON such as It’s essentially restricted
to null, Booleans, numeric, strings, arrays, and dictionaries. It
doesn’t even have a Date data type. JSON is thus not only generally
less verbose than XML it is more parsimonious in its use of data
types. Restricting itself to primitive data types makes JSON
interoperable with pretty much any programming language that exists.
No comments:
Post a Comment