[{" price ": 450000," id ":" 424905 ", "type" : "buy", "img_src" : "http://mars.jpl.nasa.gov/msl-raw-images/msss/01000/mcam/1000MR0044631300503690E01_DXXX.jpg"},
...
So, to build such a class to receive JSON mapping object:
The data class MarsProperty (
Val id: String, val img_src: String,
Val type: String,
Val price: Double
)
If is the following JSON, however, only "value", not "name", how to build a data class, please? Thank you very much!
[{_2021_04_22: "1.049271",...
CodePudding user response:
It won't be json, not just any string is called json, then write their own custom agreement parsing bai, such as string segmentation of anythingCodePudding user response:
JSON is a deal, you are not in accordance with the requirements of the agreement to preach, can be called a JSON? JSON is transformed based on K V