diff --git a/include/jsx_scanner.hrl b/include/jsx_scanner.hrl index 9d2f65c..4bfa100 100644 --- a/include/jsx_scanner.hrl +++ b/include/jsx_scanner.hrl @@ -238,11 +238,11 @@ partial_utf(<>) partial_utf(_) -> false. -string(<>, T, [key|_] = Stack, Opts, Acc) -> +string(<>, T, [key|_] = Stack, Opts, Acc) -> ?event([{key, lists:reverse(Acc)}], colon, Rest, T, Stack, Opts); -string(<>, T, Stack, Opts, Acc) -> +string(<>, T, Stack, Opts, Acc) -> ?event([{string, lists:reverse(Acc)}], maybe_done, Rest, T, Stack, Opts); -string(<>, T, Stack, Opts, Acc) -> +string(<>, T, Stack, Opts, Acc) -> escape(Rest, T, Stack, Opts, Acc); %% things get dumb here. erlang doesn't properly restrict unicode non-characters %% so you can't trust the codepoints it returns always