In the JSON decoder allow enum discriminators to appear in any position in an object, not just the first.
If the discriminator comes first, the behavior is mostly unchanged: We use the discriminator to find the schema of the relevant enum case and continue parsing with this schema. In case the discriminator appears later, it is searched first, then the Lexer is rewound to the beginning of the object, and it is parsed with the schema of the relevant enum case. The discriminator is skipped over in case class parsing.
In the JSON decoder allow enum discriminators to appear in any position in an object, not just the first.
If the discriminator comes first, the behavior is mostly unchanged: We use the discriminator to find the schema of the relevant enum case and continue parsing with this schema. In case the discriminator appears later, it is searched first, then the Lexer is rewound to the beginning of the object, and it is parsed with the schema of the relevant enum case. The discriminator is skipped over in case class parsing.
/fixes #523