I'm sure someone has done this before: A co-worker went through the trouble of making a JSON schema which can be used to validate a JSON object; however, I am lazy, and just want to generate a "default" empty JSON object from the schema. Is there an easy way to do this?
I would like to do this in Java.
Failing this, is there a way to generate a Java class (NOT at run-time) based on this schema?
Muchas gracias, amigos.
We can convert a JSON to Java Object using the readValue() method of ObjectMapper class, this method deserializes a JSON content from given JSON content String.
How about "jsonschema2pojo"?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With