Default base::JSONReader::Read() to RFC mode?

90 views
Skip to first unread message

Daniel Cheng

unread,
Sep 3, 2025, 4:58:32 PMSep 3
to cxx
Hi all,

Currently, base::JSONReader() and friends default to parsing with Chromium quirks.

How would people feel if we either:
- flipped the default to base::JSON_PARSE_RFC (and preserving behavior of all existing callers) or
- forcing it to always be explicit?

Daniel

Elly

unread,
Sep 9, 2025, 2:12:36 PMSep 9
to cxx, Daniel Cheng
Hi Daniel,

I would be happy with flipping the default to JSON_PARSE_RFC and migrating all existing callers. The Chromium quirks were in general a mistake and new uses of them are not a good idea.

-- elly

Daniel Cheng

unread,
Oct 1, 2025, 1:51:02 PMOct 1
to Elly, cxx
As of crrev.com/1519103, the JSONReader helpers no longer default to `JSON_PARSE_CHROMIUM_EXTENSIONS`. I did not flip the default yet as I think it's too risky; I hope that the fact that `JSON_PARSE_RFC` is much shorter will encourage new uses without compatibility restrictions to default to RFC-compliant parsing. I will consider flipping the default some time in the future if the usage is much more balanced between the two options :)

Daniel
Reply all
Reply to author
Forward
0 new messages