Fixing wrong JSON data Fixing wrong JSON data json json

Fixing wrong JSON data


Although there must be several way to improve this conversion maybe there is a much more effective solution.

Most of the JSON libraries allow the end user to define custom serializer/deserializer for an object. If you create a custom deserializer then it can parse the original data and you don't have to modify the stream or files.

It's not only faster but also more elegant.

(If the given JSON library doesn't support custom deserialization I would consider choosing an other one.)