Is it possible to parse as much as possible from a broken array/object?
So, given the (broken) json "[{x:0, y:1},{x:1, y:3},{x:2, y:", I'd like to retrieve the two objects {x:0,y:1} and {x:1,y:3} (ideally also {x:2, y:null}). I can achieve this by simply skipping the opening bracket and feeding the remainder to a JSONStream, but maybe there's a better way.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is it possible to parse as much as possible from a broken array/object?
So, given the (broken) json "[{x:0, y:1},{x:1, y:3},{x:2, y:", I'd like to retrieve the two objects {x:0,y:1} and {x:1,y:3} (ideally also {x:2, y:null}). I can achieve this by simply skipping the opening bracket and feeding the remainder to a JSONStream, but maybe there's a better way.
No, libjson doesn't provide any functionality for retrieving partial json objects other than the streams.