Does JSON require a root element as in XML case. As far as I know this is a valid JSON string.
{
"email":[
{
"type":"home",
"name":"john.doe@gmail.com"
},
{
"type":"work",
"name":"jdoe@gmail.com"
}
]
}
I need to convert JSON to XML an vice versa. However although the above is valid JSON when I convert it to XML it is not valid? Am I missing something or this is normal?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…