You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2014/08/13 18:56:12 UTC

[jira] [Resolved] (SOLR-6369) duplicate json key "echoParams" should be removed in ping-response

     [ https://issues.apache.org/jira/browse/SOLR-6369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man resolved SOLR-6369.
----------------------------

    Resolution: Not a Problem

bq. However there are some json-parse implementations out there that want to map this into hashtables and are not silently overwriting the key with the last seen value, but are throwing errors in the process.

This is why the json response format has always supported a "json.nl" param so that clients who are using broken json parsers can choose to get an array (or array or arrays) instead if they wish...

https://wiki.apache.org/solr/SolJSON#JSON_specific_parameters

Note: there is nothing special here about the ping response handler, or echoParams ... this is something that can come up in many cases in the solr response structure if your JSON parser can't handle repeated keys.

> duplicate json key "echoParams" should be removed in ping-response
> ------------------------------------------------------------------
>
>                 Key: SOLR-6369
>                 URL: https://issues.apache.org/jira/browse/SOLR-6369
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.9
>         Environment: testing on ubuntu 14.04
> version: 4.9.0 1604085 - rmuir - 2014-06-20 06:34:03
>            Reporter: Marc Portier
>            Priority: Trivial
>
> Apparently the /admin/ping handler will duplicate the echoParams key in the json-response.
> $ curl -s http://localhost:8983/solr/test-node-client/admin/ping?wt=json
> {"responseHeader":{"status":0,"QTime":2,"params":{"df":"text","echoParams":"all","rows":"10","echoParams":"all","wt":"json","q":"solrpingquery","distrib":"false"}},"status":"OK"}
> Having "echoParams":"all" twice in that response doesn't really make sense?
> Strictly speaking this is allowed in the json spec, so it is not a violation in principle
> http://stackoverflow.com/questions/21832701/does-json-syntax-allow-duplicate-keys-in-an-object
> However there are some json-parse implementations out there that want to map this into hashtables and are not silently overwriting the key with the last seen value, but are throwing errors in the process.
> To those a cleanup of the json response would make life somewhat easier.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org