I wish to write a webservice which serves lists of JSON objects. Is it valid JSON to return the following:
[
{"keyA1":"valA", "keyB1":"valB"}
,{"keyA2":"valA", "keyB2":"valB"}
,{"keyA3":"valA", "keyB3":"valB"}
]
Or is the "right" way to do it to put it in a single object to return:
{"elements":[
{"keyA1":"valA", "keyB1":"valB"}
,{"keyA2":"valA", "keyB2":"valB"}
,{"keyA3":"valA", "keyB3":"valB"}
]}