diff --git a/src/jsx_decoder.erl b/src/jsx_decoder.erl index b05d02fd..61d5567a 100644 --- a/src/jsx_decoder.erl +++ b/src/jsx_decoder.erl @@ -574,6 +574,7 @@ doublequote(<<>>, Handler, Acc, [single_quote|_] = Stack, Config) -> doublequote(<>, Handler, Acc, Stack, Config) -> maybe_done(Rest, handle_event({string, end_seq(Acc, Config)}, Handler, Config), Stack, Config). + singlequote(<>, Handler, Acc, [single_quote, key|Stack], Config) -> colon(Rest, handle_event({key, end_seq(Acc, Config)}, Handler, Config), [key|Stack], Config); singlequote(<>, Handler, Acc, [single_quote|Stack], Config) -> @@ -595,6 +596,7 @@ is_partial_utf(<>) true; is_partial_utf(_) -> false. + %% strips continuation bytes after bad utf bytes, guards against both too short %% and overlong sequences. N is the maximum number of bytes to strip strip_continuations(<>, Handler, Acc, Stack, Config, 0) ->