I filed a JIRA for this and will take a look at it soon: https://issues.apache.org/jira/browse/HBASE-2475
Thanks for the report, very helpful. > In the equivalent XML notation, the ordering is > specifically required per the schema. ... and Jersey adds a marshaller and unmarshaller to the JAXB framework to produce JSON. This is an artifact of jersey-json or something dumb we did when hooking up JAXB. - Andy > From: Tyler Coffin > Subject: REST Interface: Required ordering of JSON name/value pairs when > performing Insert/Update > > I am using the Stargate REST interface to HBase for > inserting data. When using JSON to transmit the query content, > I have found that specific ordering of key/value pairs within > the JSON string is required in order for the query to succeed > (otherwise a response of 'HTTP/1.1 500 Row key is invalid' error > is thrown if "key" and "Cell" are reversed). > > Example: > This string receives the above error: > {"Row":[{"Cell":[{"column":"bWVzc2FnZTptc2c=","$":"Zm9vYmFy"}],"key":"MTIzNAo="}]} > This is the valid equivalent string: > {"Row":[{"key":"MTIzNAo=","Cell":[{"column":"bWVzc2FnZTptc2c=","$":"Zm9vYmFy"}]}]} > As you can see the only difference between these two > instances is that > the "key" and "Cell" name/value pairs have their order > reversed. > > In the equivalent XML notation, the ordering is > specifically required per the schema.