Perl: the Markov chain saw | |
PerlMonks |
JSON decode problemby vlad.goshko (Novice) |
on Aug 04, 2016 at 14:49 UTC ( [id://1169124]=perlquestion: print w/replies, xml ) | Need Help?? |
vlad.goshko has asked for the wisdom of the Perl Monks concerning the following question: Hello monks, I have question about json decoding. I need to deserialize invalid json, but I dont know how. Here is what I got, sample from page:
I'm using JSON::PP module to decode with maximum loose decoding, like this:
But I have troubles with fields like this: is_touch: ('ontouchstart' in window),And this: publish_date: new Date(1431654084199),And this:
It throws error: malformed JSON string, and its understood. So question is: what can I do to filter lines like this? Json content that I receive is dynamic, so hardcoding this lines wont affect.
Back to
Seekers of Perl Wisdom
|
|