News for hackers. Stuff that matters.
Re:Parsing JSON is a Minefield by toast0 on Monday April 23, 2018 @12:34AM (#16900546)
You shouldn't use PHP's unserialize implementation with untrusted sources; but my point was that its format makes it relatively simple to parse vs json or xml where you have to do a lot of work to parse strings. If you're writing your own parser (including a parser for another language), you could decide to only parse basic types (bool, int, float, array); if you're designing your own format, you could take the lesson of length prefixed strings are much easier to use for computers than delimited strings.

There are no comments on this comment yet.