Open kenzhang-mark43 opened 2 years ago
@raymond-lam I looked into this as a first issue to contribute but it looks to me like this is actually an issue with the package being used for JSON editors on the example pages. I'm getting the correct output from FormBuilder
itself, showing double-quotes for all outputted JSON schemas.
When passing double-quoted JSON into react-json-editor-ajrm
, that library will convert the quotes to single quotes every time.
Unfortunately, that package has been deprecated, however I have left a comment for the maintainer of that project to consider changing this in their next iteration.
I did some hunting to find a good alternative for this package but I honestly can't find one that does what react-json-editor-ajrm
can do. Others use more of a form-style interface for editing JSON which is not ideal for this scenario.
Alternatively, we could simply display the JSON output on the example rather than allow it to be editable, but I do think showing that the JSON can be manipulated to change the form is a valuable demonstration. In my opinion, it might be best to wait until the new version of this JSON editor is released, as this issue is likely not a highly disruptive one.
Tried the form builder here https://ginkgobioworks.github.io/react-json-schema-form-builder/ I can see the data schema is not in json format... so it is harder to test generated schema in the rjsf playground: https://rjsf-team.github.io/react-jsonschema-form/
should be quoted like
This is what I get.