Generating sample JSON data from a JSON schema

I was looking for a java library that can generate JSON data samples that look and match this JSON schema. Does anyone know of any library that can do the job. I could not get it.

+4
source share
1 answer

Yes you can generate JSON data from a bean class using the JSON API

net.sf.json.JSONObject

The library above will provide you with the method and the method below, we can create a jsonobject from the bean class

JSONObject.fromObject(yourbean)
+1
source

Source: https://habr.com/ru/post/1538011/


All Articles