Additional fix for #29

* The previous fix (substituting a stdClass for an empty rels array) was causing looping problems, so there is now a “JSON mode” into which the parser can be put either by passing true as the third constructor parameter or by setting jsonMode = true. By default an empty rels key will be an array, but if JSON mode is set it will be an empty stdClass, ensuringcorrect serialisation.
* The tests have been updated accordingly
* A missing value property from one test has been added