JSON LANGUAGE
Omar Ismail
Senior Software Engineer @ Digitinary | Java & Spring Expert ? | AWS & Microservices Architect ? | FinTech & Open Banking Innovator ?? | Digital Payments Expert ?? | Top 200 IT Content Creator in Jordan ?? | 40K+ ??
JSON LANGUAGE
JSON (JavaScript Object Notation) is a lightweight format that helps softwares share, transfer, store and work with data. Its highly used in APIs and microservices because of their nature of getting calls (API) and inter-service communication (Microservices). Even in modular monolithic calls are made to different modules and data is communicated in JSON format.
JSON being prevalent and easy to use has become a default format for communication, sharing and transferring of data.
EXAMPLE OF JSON
{
??"data": [
?????{
????????"id": "123",
????????"from": {
???????????"name": "Some Name 1", "id": "786123000"
????????},
????????"message": "JSON is much easier and better than XML",
????????"actions": [
???????????{
???????????"id" : 123,
??????????????"name": "Comment"
???????????},
???????????{
??????????????"id": 231
??????????????"name": "reaction"
???????????}
????????],
????????"type": "status",
????????"created_time": "2021-09-02T22:21:12+0000",
????????"updated_time": "2021-09-02T22:21:13+0000"
?????},
?????{
????????"id": "111",
????????"from": {
???????????"name": "Some Name 2", "id": "123786000"
????????},
????????"message": "JSON is much easier and better than XML",
????????"actions": [
???????????{
???????????"id" : 222,
??????????????"name": "comment"
???????????},
???????????{
??????????????"id": 333
??????????????"name": "likes"
???????????}
????????],
????????"type": "status",
????????"created_time": "2021-09-02T22:21:12+0000",
????????"updated_time": "2021-09-02T22:21:13+0000"
?????}
??]
}
FEATURES OF JSON
1. It can have amounts of data and there is no such upper limit
2. Data can have nested objects and nested arrays (To support objects)
3. There can be n layers of nested data as per the requirements
4. It supports some values only
SUPPORTED TYPES
1. String
2. Double
3. Number
4. Boolean
5. Arrays
6. Objects
7. Boolean
8. Null
USAGE OF JSON
1. Configuration
2. Data Format
3. Dependency Management
4. Build Tool
5. Properties
6. Settings
7. Data Transfer Format