Yes, and JSON can be considered a misnomer for this reason. These difficulties interoperating with objects are acknowledged (but sadly, not removed) by JSON5 https://spec.json5.org/#objects it's super hard to make any specification more restrictive, because it typically breaks many things that went before.
It's likely that hundreds of thousands of developer hours were lost because of this discrepancy and misleading name since JSON became a thing. I had the same WTF moment regarding duplicate names in JSON about a decade ago after a multi-hour troubleshooting session :)... Naming things is just plain hard. I'm personally guilty of a confusing name in Apache Ant... followSymlinks="false" really should have been ignoreSymlinks=true ... because that's actually what happens: the code never even sees the symlink if you set that attribute so you can't operate on symlinks even if they exist. The name I chose focused on my use case rather than the actual implementation. *sigh* As for the Solr case, can you back up and identify where your repeated attributes are meant to be used ... you say "handler" which is defined in solr config (which doesn't have a JSON option) Specifically which API are you trying to interact with? Are you possibly looking for this to make adjustments at runtime? https://solr.apache.org/guide/solr/latest/configuration-guide/request-parameters-api.html#configuring-request-parameters -Gus On Thu, Feb 19, 2026 at 1:22 PM Dmitri Maziuk <[email protected]> wrote: > On 2/19/26 11:51, Gus Heck wrote: > > > I'm not a fan of this design in Solr either since almost every default > > implementation in every language incorrectly assumes JSON is a Map > > structure by default... > > JSON stands for JavaScript Object Notation and JavaScript does not allow > duplicate keys in its objects any more than any other programming language. > > Whether it's "correct" or not, the "add-updatehadler" syntax for > > > <str name="facet.field">subject</str> > > <str name="facet.field">country</str> > > <str name="facet.field">state</str> > > is not documented and if anyone has any idea what it should look like in > "JSON", please share. > > As well as quoting style for quotes: > > "q" : "(_query_:\"{!edismax ... > > or > > "q" : "(_query_:""{!edismax ... > > or > > "q" : "(_query_:'{!edismax ... > > ??? > > > Dima > -- http://www.needhamsoftware.com (work) https://a.co/d/b2sZLD9 (my fantasy fiction book)
