ModeShape/modeshape — pull request #695 by rhauch (2013-02-14 20:36:40+00:00)
Title: MODE-1816 The jcr:mixinTypes properties should not need to be first in the JSON requests

Changed the logic of POST to set the "jcr:primaryType" first (if specified in the JSON), then the "jcr:mixinTypes" second (again, if specified in the JSON), and finally all of the other properties.

The PUT logic was modified similarly, including the ability to _change_ the primary type (this was added sometime since one of the earlier 3.0 releases).

Note that the "jcr:mixinTypes" value can be an array of strings (this is technically the correct representation) or a single string if just one mixin type is to be named. The latter does not technically match the semantics of the multi-valued "jcr:mixinTypes" property, but it is convenient to handle both cases.