4 Jun
2024
4 Jun
'24
7:25 p.m.
вт, 4 июн. 2024 г. в 17:43, Marshall Clow via Boost
As a data point, I use the technique described here (a custom parsing hook) to find duplicate keys when parsing JSON using Python.
https://stackoverflow.com/questions/14902299/json-loads-allows-duplicate-key...
You kinda can do this with Boost.JSON using basic_parser with a custom handler: https://www.boost.org/doc/libs/release/libs/json/doc/html/json/ref/boost__js... The main issue is that it's not exactly trivial to use currently, as the default handler is not a part of the public API. If it was, you'd be able to do this: https://godbolt.org/z/hn6dKzqGM