JSON
JavaScript Object Notation (JSON) is a standard text-based format for representing structured data based on JavaScript object syntax. It is commonly used for transmitting data in web applications (e.g., sending some data from the server to the client, so it can be displayed on a web page, or vice versa). You'll come across it quite often, so in this article, we give you all you need to work with JSON using JavaScript, including parsing JSON so you can access data within it, and creating JSON.
Source: Working with JSON - https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/JSON
In your project you can use JSON to "package information" in such a way that it can be understood by all parties; your embedded device but also your web application.
Some examples:
Return a status:
1 2 3 |
|
Return two values:
1 2 3 4 |
|
Return an array of values:
1 2 3 4 |
|
Return an error:
1 2 3 4 |
|
Return an array of objects:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
You can use JSON in every programming language.