0
我想創建一個JSON結構如下:要創建JsonArray
{
"firstName": "John",
"lastName": "Smith",
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": 10021
},
"phoneNumbers": [
"212 732-1234",
"646 123-4567"
]
}
使用添加屬性的方法,我能夠創造firstName和lastName,但還沒有想出如何在Java中創建地址還有聯繫電話。 請幫我解決這個問題; Ajay