I know nothing about the JSON module, but couldn't you get it (the JSON module) to do the parsing and then implement a post-JSON processing, grep based duplicate keys error generator ?
Just a thought in an idle passing moment ...
A user level that continues to overstate my experience :-))
This must have been a very short idle moment... ;-)
The above json snippet gets parsed without errors. The problem is, that the resulting hash does only have one key 'op' and the value seems to be the last parsed value. So the resulting hash does have only three distinct keys. You can't see at the parsing result whether the delivered json snippet was not valid according to the mentioned RFC.
UPDATE: Looking at the documentation of the JSON module showed that the behaviour can be influenced by several variables. But non of them is targeting your problem. The possibility of incremental parsing seems also not solve your problem. So, my conclusion: Make a feature request to add a behaviour config variable disallowing multiple equal keys. Knowing that won't help you at the moment.