JSON5 Marshaling #5642
BigBoyBarney
started this conversation in
Ideas/Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
The way JSON marshaling / unmarshaling works is fantastic, and I find it super cool that
JSON5is supported at all. Thank you for that!!Currently, even if the marshal options specify
JSON5, it will output plainJSON. This is technically not wrong, as plainJSONis validJSON5, but sort of defeats the purpose of it.Example use case: I would like to use
JSON5for a project's config file, to make it more user-friendly and less ugly. Parsing the file is no problem, but saving the config again will un-json5 the config file, which means a template engine would be needed.Currently,
json.Marshal_Optionshas a few fields to control howMSJONis marshalled, maybe something similar could be done forJSON5, to make it output the superset instead of plain?Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions