Fixed unions not being parsed correctly in JSON.

This would happen if they were supplied in an order that does not match
the schema relative to other fields. It now supports any ordering.

Change-Id: I9d309cd4e6e5c470f01d9d431806eba4f9f46559
Tested: on Linux.
1 file changed