[FFmpeg-user] JSON writer Introduces malformed string when serializing usIng GSON
Moritz Barsnick
barsnick at gmx.net
Thu Feb 13 18:24:05 EET 2020
On Thu, Feb 13, 2020 at 07:59:31 -0800, Carl Zwanzig wrote:
> 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.
No, assuming there's a schema or a value type definition behind those,
that's not correct. An integer type value is *never* to be quoted. A
boolean type value is also *never* quoted, it is incorrect if encoded
as '"true"', it's always just 'true'. The parser may not be aware of a
schema, but it would e.g. receive a string "true" and not know that it's
meant to represent a boolean value.
I had to fight some formatting errors (made by myself) recently, and
the receiving side correctly complained.
ffprobe's output is, to my knowledge, schema based, so the user needs
to get what they expect.
Sorry for off topic,
cheers,
Moritz
More information about the ffmpeg-user
mailing list