Login  Register

Re: Generate class hierarchy from JSON Schema

Posted by SergeStinckwich on Jan 20, 2020; 6:34pm
URL: https://forum.world.st/Generate-class-hierarchy-from-JSON-Schema-tp5110239p5110368.html

I had a look Norbert, but some features are missing like support for anyOf or multiple types like:
{
    "type": ["string", "null"]
}

I need some time to understand how to add them.


On Sat, Jan 18, 2020 at 9:55 AM <[hidden email]> wrote:
Great work ! I will have a look.

I want to be able to generate JSON files following a JSON Schema with a high level API. So my idea was to generate automatically from JSON Schema the class hierarchy but a runtime model might be enough maybe.

Regards,

Sent from my iPhone

On 18 Jan 2020, at 09:28, Norbert Hartl <[hidden email]> wrote:

We have 


which is an implementation of basic stuff in JSON schema. But it does not compile classes it just creates a runtime model. To be honest I never understood why we make the effort to compile classes for parsed model. The runtime model works usually pretty well. The only reason I can see is that it is easier to store somewhere. 

If you like our code and you miss things, we are eager to add the stuff we not had (yet) reason to do so.

Norbert

Am 18.01.2020 um 09:20 schrieb Serge Stinckwich <[hidden email]>:

Hi there,

anyone has experience about generating a class hierarchy from a JSON Schema ? Code available somewhere ?

Thank you.

--
Serge Stinckwic
h

Int. Research Unit
 on Modelling/Simulation of Complex Systems (UMMISCO)
Sorbonne University
 (SU)
French National Research Institute for Sustainable Development (IRD)
U
niversity of Yaoundé I, Cameroon
"Programs must be written for people to read, and only incidentally for machines to execute."
https://twitter.com/SergeStinckwich



--
Serge Stinckwic
​h​

Int. Research Unit
 on Modelling/Simulation of Complex Systems (UMMISCO)
​Sorbonne University
 (SU)
French National Research Institute for Sustainable Development (IRD)​
U
​niversity of Yaoundé I​, Cameroon
"Programs must be written for people to read, and only incidentally for machines to execute."
https://twitter.com/SergeStinckwich