On 6/20/2011 8:08 PM, entdeveloper wrote:
Technically, yes, it's valid json, but most libraries treat the json objects
as maps, and with multiple "add" elements as the keys, you cannot properly
deserialize.

As an example, try putting this into jsonlint.com, and notice it trims off
one of the docs:
{
  "add": {"doc": {"id" : "TestDoc1", "title" : "test1"} },
  "add": {"doc": {"id" : "TestDoc2", "title" : "another test"} }
}

Is there something I'm just not seeing? Should we consider cleaning up this
format, possibly using some json arrays so that it makes more sense from a
json perspective?

This was brought up recently and should now be fixed in Solr 3.2.

https://issues.apache.org/jira/browse/SOLR-2496

Shawn

Reply via email to