Tags: karelwar/jiffy
Tags
Yield back to Erlang while encoding JSON
This adds a configurable limit on the number of bytes produced by
the encoder before yielding back to the Erlang VM. This is to avoid the
infamous scheduler collapse issues.
The `jiffy:encode/2` now takes an option `{bytes_per_iter,
pos_integer()}` that controls the yield frequency. The default value is
2048.
Noncharacters U+FFFF and U+FFFE are not invalid. Properly decode them and accept to encode them. This was clarified by Unicode Technical Committee: http://www.unicode.org/versions/corrigendum9.html
Add check for below array bounds Signed-off-by: Nobuhiro Iwamatsu <[email protected]>
Prevent segfaults on unterminated strings A single quote input was causing segfaults due to sneaking past the string termination logic. This patch corrects that lapse in conditional by only parsing strings where a closing quote was found. All other strings are rejected as invalid. Big thanks to Jean-Charles Campagne (@jccampagne) for reporting the issue.
PreviousNext