[英]Parsing Json to convert into DTO
我要轉換以下 JSON
{
"docType": {
"order": 1,
"type": "String"
},
"docNum": {
"order": 2,
"type": "String"
},
"amount": {
"order": 3,
"type": "Double"
}
}
通過解析上面的 JSON 進入 DTO 讓我們說
私有 String doctype 的 OutPutFileDTO,私有 String docNum,私有 Double 數量,
注意:順序是指變量的排序。
您可以使用 Gson( https ://mkyong.com/java/how-to-parse-json-with -gson/ )
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.