JSON Structure for List of Objects

前端 未结 3 413
一个人的身影
一个人的身影 2020-12-24 04:50

I would like to know, whats the right structure for a list of objects in JSON.

We are using JAXB to convert the POJO\'s to JSON.

Here is the choices, Please

3条回答
  •  情书的邮戳
    2020-12-24 05:09

    As others mentioned, Justin's answer was close, but not quite right. I tested this using Visual Studio's "Paste JSON as C# Classes"

    {
        "foos" : [
            {
                "prop1":"value1",
                "prop2":"value2"
            },
            {
                "prop1":"value3", 
                "prop2":"value4"
            }
        ]
    }
    

提交回复
热议问题