Hi I have this weird situation where I have a JSON producing service that represents a very complex object graph and this bject graph does not have a JSON schema that it is based on. The reason for this is because originaly there is an EJB service and this REST service is just build on top of it with simple 1:1 mapping in between objects.
Since I don't have a contract for this service I see 2 options:
- Import the DTO-s from the producer project directly into my consumer project in which case every change on the DTO-s in the producer project potentialy may be a breaking change for my module.
- Use some generic API for the JSON object as JsonObject f.ex.
My question. Do I have a good alternative when I need to read complex object structure from JSON and I don't have a JSON schema to generate my Java objects ?
Is there any point into trying to describe the incoming input on the recieving side of the JSON ?