Closed LeighYCompton closed 1 year ago
Hey Leigh,
You should be able to convert the object to a JSON string using JSON.stringify(schema)
, if you want to format it you can use JSON.stringify(schema, undefined, 2)
where '2' is the number of spaces to use.
Yeah you're seeing the JavaScript output whilst JSON is a little different.
Perhaps I don't understand, but the converted schema doesn't appear to be proper JSON.
In the output to the console, I see:
This was a very simple schema -- if I were converting a large/complex schema there would be quite a bit of manual editing required to turn the result into proper JSON.