JSON Parsing Tests, Prunned

Appendix to: seriot.ch Parsing JSON is a Minefield http://www.seriot.ch/parsing_json.php

2016-10-28 00:52:01

Contents

  1. Color Scheme
  2. Full Results
  3. Results by Parser

1. Color scheme:

expected result
parsing should have succeeded but failed
parsing should have failed but succeeded
result undefined, parsing succeeded
result undefined, parsing failed
parser crashed
timeout

2. Full Results

gRPC's json
i_object_key_lone_2nd_surrogate.json {"\uDFAA":0}
i_string_UTF-8_invalid_sequence.json ["E697A5D188FA"] <=> ["日ш"]
n_string_UTF8_surrogate_U+D800.json ["EDA080"] <=> [""]
y_string_utf16BE_no_BOM.json 00[00"00E900"00] <=> [""]

3. Results by Parser

gRPC's json

i_object_key_lone_2nd_surrogate.json {"\uDFAA":0}
i_string_1st_surrogate_but_2nd_missing.json ["\uDADA"]
i_string_1st_valid_surrogate_2nd_invalid.json ["\uD888\u1234"]
i_string_UTF-16LE_with_BOM.json FFFE[00"00E900"00]00 <=> [""]
i_string_UTF-8_invalid_sequence.json ["E697A5D188FA"] <=> ["日ш"]
i_string_incomplete_surrogate_and_escape_valid.json ["\uD800\n"]
i_string_incomplete_surrogate_pair.json ["\uDd1ea"]
i_string_incomplete_surrogates_escape_valid.json ["\uD800\uD800\n"]
i_string_invalid_lonely_surrogate.json ["\ud800"]
i_string_invalid_surrogate.json ["\ud800abc"]
i_string_inverted_surrogates_U+1D11E.json ["\uDd1e\uD834"]
i_string_lone_second_surrogate.json ["\uDFAA"]
i_string_not_in_unicode_range.json ["F4BFBFBF"] <=> [""]
i_string_truncated-utf-8.json ["E0FF"] <=> [""]
i_string_unicode_U+10FFFE_nonchar.json ["\uDBFF\uDFFE"]
i_string_unicode_U+1FFFE_nonchar.json ["\uD83F\uDFFE"]
i_string_unicode_U+FDD0_nonchar.json ["\uFDD0"]
i_string_unicode_U+FFFE_nonchar.json ["\uFFFE"]
i_structure_500_nested_arrays.json [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[(...)
i_structure_UTF-8_BOM_empty_object.json EFBBBF{} <=> {}
n_string_UTF8_surrogate_U+D800.json ["EDA080"] <=> [""]
n_string_invalid_utf-8.json ["FF"] <=> [""]
n_string_iso_latin_1.json ["E9"] <=> [""]
n_string_lone_utf8_continuation_byte.json ["81"] <=> [""]
n_string_overlong_sequence_2_bytes.json ["C0AF"] <=> [""]
n_string_overlong_sequence_6_bytes.json ["FC83BFBFBFBF"] <=> [""]
n_string_overlong_sequence_6_bytes_null.json ["FC8080808080"] <=> [""]
y_string_utf16BE_no_BOM.json 00[00"00E900"00] <=> [""]
y_string_utf16LE_no_BOM.json [00"00E900"00]00 <=> [""]