Hello Wenyu,
A JSON message has a certain structure, so the message that you send or received will have certain objects, lists, attributes(fields), this structure of where in the message is mentioned what you can upload/create in mendix. This helps a system too map the elements from a message to a different structure or just helps to know what is in the message.
So, for example, the structure of the added snippet is the following:
the cars
array contains objects that have properties for make
, model
, and year
. Each car object also has a nested specs
object that includes details about the engine
, horsepower
, and transmission
, making it two layers deep, further you can see which attributes are strings or integers/decimals
{
"cars": [
{
"make": "Toyota",
"model": "Camry",
"year": 2022,
"specs": {
"engine": "2.5L 4-Cylinder",
"horsepower": 203,
"transmission": "8-Speed Automatic"
}
},
{
"make": "Honda",
"model": "Civic",
"year": 2021,
"specs": {
"engine": "2.0L 4-Cylinder",
"horsepower": 158,
"transmission": "CVT"
}
},
{
"make": "Ford",
"model": "Mustang",
"year": 2023,
"specs": {
"engine": "5.0L V8",
"horsepower": 450,
"transmission": "6-Speed Manual"
}
}
]
}
Hope this helps,
Good luck!