JSON & REST API
Amine Aouled Hamed
amine.ahd at gmail.com
Wed Dec 6 04:48:50 EST 2017
Unfortunately due to an unexpected issue I was not able to join the comm
protocols meeting of yesterday in which I wanted to talk about JSON and
RESTful API therefore I will right my thoughts here to be discussed.
Having personally worked with both I think they are the best candidates
compared to similar technologies for what they offer:
I found JSON much better in term of readability compared to XML which
arguably makes it easier to debug and also easier to process as it
naturally maps to most programming languages used in Embedded systems
(notably C/C++). There exist also many mature and efficient libraries to
handle JSON and at the same time validate it (there do exist a JSON scheme
standard as well).Having this standard helps a lot in ensuring the
integrity and the validity of the data being communicated.
JSON is used in many places and getting more visibility compared to XML in
all areas especially the web and so it makes sense if we would like to
communicate with the external world.
RESTful API is not a protocol but rather a style or a set of practices on
how communication between different applications should be. This makes it
flexible by nature as the choice of protocols and technologies to use is up
to the developer to decide. Most common infrastructure used in RESTful API
is HTTP/HTTPs because of how naturally the methods map to the idea of
REST(GET, POST, DELETE etc...).
Same as JSON, RESTful is being used more and more compared to SOAP for
example and today almost any decent cloud service is offering a REST API
therefore it makes sense to use it as a way of communicating with 3rd party
services as well as private services.
Finally, those two technologies are almost always used together which means
there exist a lot of resources out there and can be used right always which
reduces the time and effort needed to get something up and running.
I will try to continue filling up the overview page any help would be
appreciated as I am not familiar with some of them.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the genivi-projects