Misc. > Samples / Templates

Sample Json data in Misc.

Sample JSON data


Below is the code snippet of valid JSON data.

JSON of Single Item

This sample JSON data is converted from a single object whose property is AutoId, FirstName, LastName, Age, Active.

{"AutoId":16,"FirstName":"Sheo","LastName":"Narayan","Age":25,"Active":true}

JSON of Collection of items

Below code snippet is the collection items. Where item property is CategoryId, CategoryName.

[
{"CategoryId":1,"CategoryName":".NET Technologies"},
{"CategoryId":2,"CategoryName":"Java Technologies"},
{"CategoryId":4,"CategoryName":"Open Stack"}
]

JSON of Collction of Items (primary key - foreign key relationship)

Below JSON data is for the collection of SubCategory object whose CategoryId property is foreign key of Category object (noted here as Categories that is nothing but collection of Category).

[
{"Categories":
{"CategoryId":1,"CategoryName":".NET Technologies"},
"SubCategoryId":1,"SubCategoryName":"ASP.NET","CategoryId":1
},
{"Categories":
{"CategoryId":2,"CategoryName":"Java Technologies"},
"SubCategoryId":2,"SubCategoryName":"Sprint","CategoryId":2
},
{"Categories":{"CategoryId":1,"CategoryName":".NET Technologies"},
"SubCategoryId":4,"SubCategoryName":"ASP.NET MVC","CategoryId":1
},
{"Categories":{"CategoryId":4,"CategoryName":"Open Stack"},
"SubCategoryId":5,"SubCategoryName":"Mongo DB","CategoryId":4
}
]

XML stuffs

 Views: 5127 | Post Order: 8



Write for us






Hosting Recommendations