Hello - I'm looking for advice on how to handle a situation where the JSON may not be properly formatted for some of the records in a java application.
In this case, I make a web services call to retrieve a block of JSON formatted data, but some of the records returned are containing characters such as an unescaped double quote ' " '. This is due to some encoding issues which would ideally be fixed - but in the meantime, is there a way to bypass the record in an elegant way? The only thing I can think of is to break apart the incoming stream by braces and attempt to use gson to parse the contents in between. I don't like this method because I'm having to perform work that gson was already providing me - such as taking the entire JSON blob and giving me a java object instead of a series of java objects.
Any thoughts on how to use gson in a fault tolerant way?