0%

JSON

JSON (JavaScript Object Notation)

1
2
3
4
{
"name": "ming",
"age": 18
}
1
2
3
4
data class Person (
val name: String,
val age: Int
)

1
2
3
4
5
6
7
8
9
10
[
{
"name": "ming",
"age": 18
},
{
"name": "hong",
"age": 17
}
]
1
2
3
data class Couple (
val a: List<Person>
)
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"results": [
{
"title": "标题",
"content": "内容",
"createdAt": "2020-04-15T11:18:30.369Z",
"updatedAt": "2020-04-15T12:59:00.190Z",
"id": null,
"username": "yun",
"objectId": "5e96ed86a5a0f50008ab31a8"
}
]
}
1
2
3
data class A (

)