pojoTojson for scala class on idea

We often need to convert classes to JSON text. There are many similar tools in Ideas, but we cannot convert scala’s class and case classes. Is there a similar tool in scala

kotlin also has the util of idea

found this that converts from a JSON schema to a class definition:

This one also doesn’t need a schema, but converts any json data to a class definition:
https://json2caseclass.cleverapps.io

the other use case is to generate sample JSON from a class definition?

1 Like

good, yes, need a tool to generate sample JSON from a scala class definition.
writer document or test by postman, the tool will be useful

maybe a combination of random-data-generator to generate a random instance of a class, and upickle to create a JSON serialiser for that class