I need to generate some radom json sample, compliant to a schema dynamically. Meaning that the input would be a schema (e.g. json-schema) and the output would a json that complies to it.
I'm looking for pointers. Any suggestions ?
I need to generate some radom json sample, compliant to a schema dynamically. Meaning that the input would be a schema (e.g. json-schema) and the output would a json that complies to it.
I'm looking for pointers. Any suggestions ?
This is not complete solution, but you can get it from here.
Let's assume we have our domain objects we want to generate:
If we do this:
then we will be able to generate some primitive values:
Now to jump to custom type we need to add
to our
Gobject.Now we can
and with some extra effort even
Now you need to extend it to all primitive you have, add real implementation of random and support classes with more then 1 field and you ready to go.
You may even make some fancy library out of it.