glideapps / quicktype

Generate types and converters from JSON, Schema, and GraphQL
https://app.quicktype.io
Apache License 2.0
12.33k stars 1.07k forks source link

Accept JSON5 as input #1144

Open dzcpy opened 5 years ago

dzcpy commented 5 years ago

JSON is a pretty rigid format, even changes from double quotes to single quotes would fail its validation. It happened many times to me that what I really need to input is not a strict JSON but a Javascript Object. In this regards I think it would be quite convenient if we can add JSON5 as an input source, which is 100% compatible with standard JSON, but with steroids to make most normal Javascript Objects valid as well. For reference, here is the specification of JSON5 https://json5.org/

schani commented 5 years ago

Would you consider contributing this feature? We'd be happy to help.

dzcpy commented 5 years ago

Thanks for the reply. I've made an attempt, but it doesn't seem to work. What could be the issue?