GNOME Bugzilla – Bug 747094
Please make json-glib optionally strictly following RFC7159
Last modified: 2017-09-05 10:41:47 UTC
There is now an official IETF standard for JSON in RFC7159 (http://rfc7159.net/). It would lovely if json-glib optionally enforced all rules in that RFC.
I am not opposed to a "strict" mode for JsonParser in any way. It would help if you could summarise what you consider "strict" enforcement of the new RFC. Off the top of my head, the only thing we allow are comments, mostly because JsonScanner is a fork of GScanner.
I'd like to add that it's probably going to be easier, and more maintainable in the longer term, if this story was part of a larger refactoring of JsonParser: - write a JSON tokenizer not based on GScanner - ensure that the JSON tokenizer works in strict and "relaxed" mode - ensure that the JSON tokenizer works on input streams and partial reads - ensure that the JSON tokenizer works in terms of json-glib data structures - rewrite JsonParser on top of the tokenizer, and only use it for signal emission and general purpose API Ideally, the new JSON tokenizer could be public, but even a private API would be fine.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/json-glib/issues/15.