nimjson icon indicating copy to clipboard operation
nimjson copied to clipboard

[Question] YAML status

Open arkanoid87 opened this issue 2 years ago • 1 comments

Hello! This not really an issue, but just a question.

I've just found out that YAML 1.2 is a superset of the JSON schema, and the target is to maintain a baseline compatibility with it from v1.2.

Are you aware if it is possible to convert a YAML schema which is JSON compatible into a JSON schema to get Nim types generated automatically with nimjson?

Long story short, is there a route to go from YAML to Nim types passing through nimjson, in a way that I can then load JSON files that can be validated against that YAML schema in Nim into types generated by nimjson at compile time?

thanks!

arkanoid87 avatar Aug 20 '23 01:08 arkanoid87

@arkanoid87 I didn't know that.

nimjson only handles JSON. So even if YAML becomes a superset of JSON, I probably will not support YAML format. It is preferable to use some tool to convert YAML to JSON, and then use nimjson.

jiro4989 avatar Dec 12 '23 10:12 jiro4989