I want to create a request body to test an API. The request body is a complex JSON as below:
{
"certificate_registry": {
"images": [
{
"url": "https://path.jpg"
}
],
"truck": {
"plate": "aaaa-1111",
"truck_model_id": 1,
"truck_type_id": 1
}
}
}
Please suggest me what is the best way to create new complex JSON in java?
I used the tool online but it creates many classes for only 1 request body. It's not easy to understand, maintain.