Friday, February 11, 2022

Json - Array type element formats | Sample json payloads

Here , you can see a sample array type employee element having fname, lname and dept details.

Json format 1:

[

{"Fname":"","Lname":"","Dept": ""},

{"Fname":"","Lname":"","Dept": ""}

]

Json format 2:

{"employees":[    
{"name":"sri", "email":"sri@gmail.com", "age":23},    
 {"name":"sand", "email":"sand@gmail.com", "age":28},  
{"name":"dip", "email":"dip@gmail.com", "age":33},    
{"name":"Bob", "email":"bob32@gmail.com", "age":41}   
]}  


Json format 3: most understandable format:

{

"Employees":{

"Employee":[    
{"name":"sri", "email":"sri@gmail.com", "age":23},    
 {"name":"sand", "email":"sand@gmail.com", "age":28},  
{"name":"dip", "email":"dip@gmail.com", "age":33},    
{"name":"Bob", "email":"bob32@gmail.com", "age":41}   
]

}  

}


No comments:

Post a Comment

Featured Post

OIC - OIC Utility to Reprocess Failed Real-Time Integration JSON Payloads

📌 Use Case In real-time OIC integrations, JSON payloads are exchanged with external systems via REST APIs. When such integrations fail (du...