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 XSLT: Execute Only When At Least One Field Has Value and None Are Blank

๐Ÿ”ท OIC XSLT: Validate Fields Before Executing Logic ๐Ÿ”น Requirement Fields: field1, field2, field3, field4, field5 ✔ Execute only when: At le...