Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は、他のオブジェクト B のセットを含む、オブジェクト A から作成された正しい JSON 文字列を持っています。
JSON 文字列からこのオブジェクトを取り戻そうとすると、JSON 文字列に含まれるすべてのエントリではなく、一連のオブジェクト B に 1 つのエントリしかありません。
何か提案はありますか、それとも禁止されていることをしただけですか??
ありがとう
転倒する可能性がある人のために、これでセットの問題が解決しました。
JSONArray jsonArray = JSONArray.fromObject(object); JSONObject jsonObject = new JSONObject(); jsonObject.put("data", jsonArray.toString());