Hi,,

I have a json file and I would like to convert it into java class. The main aim is to create a dynamic interface from the JSON file. I found metawidget library which can generate interface from a java class. I would like to know or possibly a sample code which can convert json schema to java class.

My json file is has strings, arrays and everything.

What I precisly looking for is a library which can take json file as an input and output java class file without asking additional class files.

I think it is too much to ask but I would like to give it a try.

thanks in advance

Never heard of such think. You can map JSON to Java class with GSON or Jackson, but these are mapped to specific parameter of JSON

Metawidget can generate UIs from many sources, not just Java classes. This includes, for example, generating UIs from JSON objects. See JsonSchemaInspector.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.