[FFmpeg-user] JSON writer Introduces malformed string when serializing usIng GSON

Carl Zwanzig cpz at tuunq.com
Thu Feb 13 17:59:31 EET 2020


On 2/13/2020 3:00 AM, Moritz Barsnick wrote:
> This is fully correct JSON. What you need is a proper JSON parser - it
> will understand this quoting and escaping.

Many people use regular expressions as a "simple" way to parse JSON (heck, 
I've done that); this often works, but when it doesn't it can fail 
spectacularly. At least in this case, use a real parser.  (If the OP -is- 
using a non-regexp parser, try a different one.)

BTW, some people recommend quoting all values, not just strings (e.g. 
"probe_score": "100"); I don't have an opinion on that but I can't see it 
hurting anything.

Later,

z!


More information about the ffmpeg-user mailing list