├── test ├── bson │ └── input │ │ ├── test1.bson │ │ ├── test18.bson │ │ ├── test19.bson │ │ ├── test25.bson │ │ ├── test37.bson │ │ ├── test40.bson │ │ ├── test42.bson │ │ ├── test46.bson │ │ ├── test9.bson │ │ ├── test10.bson │ │ ├── test2.bson │ │ ├── test21.bson │ │ ├── test59.bson │ │ ├── test11.bson │ │ ├── test27.bson │ │ ├── test32.bson │ │ ├── test57.bson │ │ ├── test58.bson │ │ ├── test29.bson │ │ ├── test30.bson │ │ ├── test48.bson │ │ ├── test5.bson │ │ ├── test50.bson │ │ ├── test8.bson │ │ ├── test13.bson │ │ ├── test16.bson │ │ ├── test23.bson │ │ ├── test14.bson │ │ ├── test31.bson │ │ ├── test6.bson │ │ ├── test12.bson │ │ ├── test15.bson │ │ ├── test17.bson │ │ ├── test20.bson │ │ ├── test22.bson │ │ ├── test24.bson │ │ ├── test26.bson │ │ ├── test28.bson │ │ ├── test3.bson │ │ ├── test33.bson │ │ ├── test34.bson │ │ ├── test35.bson │ │ ├── test36.bson │ │ ├── test38.bson │ │ ├── test39.bson │ │ ├── test4.bson │ │ ├── test41.bson │ │ ├── test43.bson │ │ ├── test44.bson │ │ ├── test45.bson │ │ ├── test47.bson │ │ ├── test49.bson │ │ ├── test51.bson │ │ ├── test52.bson │ │ ├── test53.bson │ │ ├── test54.bson │ │ ├── test55.bson │ │ ├── test56.bson │ │ └── test7.bson ├── corelib │ ├── input │ │ ├── JSON_checker │ │ │ ├── fail29.json │ │ │ ├── fail30.json │ │ │ ├── fail16.json │ │ │ ├── fail31.json │ │ │ ├── fail33.json │ │ │ ├── fail4.json │ │ │ ├── fail8.json │ │ │ ├── fail2.json │ │ │ ├── fail23.json │ │ │ ├── fail24.json │ │ │ ├── fail27.json │ │ │ ├── fail28.json │ │ │ ├── fail19.json │ │ │ ├── fail20.json │ │ │ ├── fail5.json │ │ │ ├── fail6.json │ │ │ ├── fail7.json │ │ │ ├── fail9.json │ │ │ ├── fail11.json │ │ │ ├── fail25.json │ │ │ ├── fail12.json │ │ │ ├── fail14.json │ │ │ ├── fail15.json │ │ │ ├── fail17.json │ │ │ ├── fail21.json │ │ │ ├── fail22.json │ │ │ ├── fail26.json │ │ │ ├── fail3.json │ │ │ ├── fail32.json │ │ │ ├── fail13.json │ │ │ ├── fail18.json │ │ │ ├── pass2.json │ │ │ ├── fail1.json │ │ │ ├── fail10.json │ │ │ ├── Acknowledgement.txt │ │ │ └── pass3.json │ │ ├── JSONTestSuite │ │ │ ├── n_number_+1.json │ │ │ ├── n_number_0e.json │ │ │ ├── n_single_space.json │ │ │ ├── y_array_empty.json │ │ │ ├── n_array_unclosed.json │ │ │ ├── n_number_++.json │ │ │ ├── n_number_+Inf.json │ │ │ ├── n_number_-01.json │ │ │ ├── n_number_-2..json │ │ │ ├── n_number_-NaN.json │ │ │ ├── n_number_.-1.json │ │ │ ├── n_number_0.3e.json │ │ │ ├── n_number_0.e1.json │ │ │ ├── n_number_0e+.json │ │ │ ├── n_number_1.0e.json │ │ │ ├── n_number_1eE2.json │ │ │ ├── n_number_2.e3.json │ │ │ ├── n_number_9.e+.json │ │ │ ├── n_number_Inf.json │ │ │ ├── n_number_NaN.json │ │ │ ├── n_object_emoji.json │ │ │ ├── n_structure_no_data.json │ │ │ ├── y_array_false.json │ │ │ ├── y_array_null.json │ │ │ ├── y_number.json │ │ │ ├── y_number_0e+1.json │ │ │ ├── y_number_0e1.json │ │ │ ├── y_object_empty.json │ │ │ ├── y_string_pi.json │ │ │ ├── y_string_space.json │ │ │ ├── y_string_utf8.json │ │ │ ├── n_array_extra_close.json │ │ │ ├── n_array_extra_comma.json │ │ │ ├── n_array_incomplete.json │ │ │ ├── n_array_just_comma.json │ │ │ ├── n_array_just_minus.json │ │ │ ├── n_array_star_inside.json │ │ │ ├── n_incomplete_false.json │ │ │ ├── n_incomplete_null.json │ │ │ ├── n_incomplete_true.json │ │ │ ├── n_number_-1.0..json │ │ │ ├── n_number_.2e-3.json │ │ │ ├── n_number_0.1.2.json │ │ │ ├── n_number_0.3e+.json │ │ │ ├── n_number_0_capital_E.json │ │ │ ├── n_number_1.0e+.json │ │ │ ├── n_number_1.0e-.json │ │ │ ├── n_number_1_000.json │ │ │ ├── n_number_2.e+3.json │ │ │ ├── n_number_2.e-3.json │ │ │ ├── n_number_expression.json │ │ │ ├── n_number_hex_1_digit.json │ │ │ ├── n_number_invalid+-.json │ │ │ ├── n_object_no-colon.json │ │ │ ├── n_string_escape_x.json │ │ │ ├── n_structure_end_array.json │ │ │ ├── n_structure_open_object.json │ │ │ ├── n_structure_single_star.json │ │ │ ├── y_array_empty-string.json │ │ │ ├── y_number_after_space.json │ │ │ ├── y_number_minus_zero.json │ │ │ ├── y_number_negative_one.json │ │ │ ├── y_number_simple_int.json │ │ │ ├── y_object_empty_key.json │ │ │ ├── y_object_simple.json │ │ │ ├── y_string_in_array.json │ │ │ ├── y_string_unicode_2.json │ │ │ ├── y_structure_lonely_int.json │ │ │ ├── n_array_comma_after_close.json │ │ │ ├── n_array_comma_and_number.json │ │ │ ├── n_array_double_comma.json │ │ │ ├── n_array_missing_value.json │ │ │ ├── n_array_number_and_comma.json │ │ │ ├── n_number_0_capital_E+.json │ │ │ ├── n_number_hex_2_digits.json │ │ │ ├── n_number_infinity.json │ │ │ ├── n_number_minus_space_1.json │ │ │ ├── n_number_with_alpha.json │ │ │ ├── n_object_bad_value.json │ │ │ ├── n_object_missing_colon.json │ │ │ ├── n_object_missing_key.json │ │ │ ├── n_object_missing_value.json │ │ │ ├── n_object_non_string_key.json │ │ │ ├── n_object_single_quote.json │ │ │ ├── n_object_unquoted_key.json │ │ │ ├── n_string_backslash_00.json │ │ │ ├── n_string_escaped_emoji.json │ │ │ ├── n_string_single_doublequote.json │ │ │ ├── n_string_unescaped_tab.json │ │ │ ├── n_structure_UTF8_BOM_no_data.json │ │ │ ├── n_structure_angle_bracket_..json │ │ │ ├── n_structure_double_array.json │ │ │ ├── n_structure_lone-open-bracket.json │ │ │ ├── n_structure_open_array_comma.json │ │ │ ├── n_structure_unclosed_array.json │ │ │ ├── y_array_with_leading_space.json │ │ │ ├── y_number_int_with_exp.json │ │ │ ├── y_number_negative_int.json │ │ │ ├── y_number_negative_zero.json │ │ │ ├── y_number_real_capital_e.json │ │ │ ├── y_number_real_exponent.json │ │ │ ├── y_number_real_neg_exp.json │ │ │ ├── y_object_basic.json │ │ │ ├── y_string_null_escape.json │ │ │ ├── y_string_simple_ascii.json │ │ │ ├── y_string_u+2028_line_sep.json │ │ │ ├── y_string_u+2029_par_sep.json │ │ │ ├── y_string_unicode.json │ │ │ ├── y_structure_lonely_false.json │ │ │ ├── y_structure_lonely_null.json │ │ │ ├── y_structure_lonely_string.json │ │ │ ├── y_structure_lonely_true.json │ │ │ ├── y_structure_string_empty.json │ │ │ ├── i_number_neg_int_huge_exp.json │ │ │ ├── n_array_double_extra_comma.json │ │ │ ├── n_array_incomplete_invalid_value.json │ │ │ ├── n_array_inner_array_no_comma.json │ │ │ ├── n_array_unclosed_trailing_comma.json │ │ │ ├── n_multidigit_number_then_00.json │ │ │ ├── n_number_minus_infinity.json │ │ │ ├── n_number_real_garbage_after_e.json │ │ │ ├── n_number_starting_with_dot.json │ │ │ ├── n_number_with_leading_zero.json │ │ │ ├── n_object_bracket_key.json │ │ │ ├── n_object_double_colon.json │ │ │ ├── n_object_missing_semicolon.json │ │ │ ├── n_object_trailing_comma.json │ │ │ ├── n_object_unterminated-value.json │ │ │ ├── n_string_incomplete_escape.json │ │ │ ├── n_string_start_escape_unclosed.json │ │ │ ├── n_string_unescaped_crtl_char.json │ │ │ ├── n_string_unicode_CapitalU.json │ │ │ ├── n_string_with_trailing_garbage.json │ │ │ ├── n_structure_U+2060_word_joined.json │ │ │ ├── n_structure_capitalized_True.json │ │ │ ├── n_structure_close_unopened_array.json │ │ │ ├── n_structure_open_array_apostrophe.json │ │ │ ├── n_structure_open_array_string.json │ │ │ ├── n_structure_open_object_comma.json │ │ │ ├── n_structure_trailing_#.json │ │ │ ├── n_structure_unicode-identifier.json │ │ │ ├── n_structure_whitespace_formfeed.json │ │ │ ├── y_array_arraysWithSpaces.json │ │ │ ├── y_array_ending_with_newline.json │ │ │ ├── y_array_with_1_and_newline.json │ │ │ ├── y_array_with_trailing_space.json │ │ │ ├── y_number_real_pos_exponent.json │ │ │ ├── y_number_simple_real.json │ │ │ ├── y_object.json │ │ │ ├── y_string_comments.json │ │ │ ├── y_string_double_escape_a.json │ │ │ ├── y_string_double_escape_n.json │ │ │ ├── y_string_one-byte-utf-8.json │ │ │ ├── y_string_three-byte-utf-8.json │ │ │ ├── y_string_two-byte-utf-8.json │ │ │ ├── y_string_unescaped_char_delete.json │ │ │ ├── y_string_with_del_character.json │ │ │ ├── y_structure_true_in_array.json │ │ │ ├── y_structure_whitespace_array.json │ │ │ ├── i_number_pos_double_huge_exp.json │ │ │ ├── i_number_real_underflow.json │ │ │ ├── i_string_invalid_surrogate.json │ │ │ ├── i_string_lone_second_surrogate.json │ │ │ ├── i_structure_UTF-8_BOM_empty_object.json │ │ │ ├── n_array_1_true_without_comma.json │ │ │ ├── n_array_colon_instead_of_comma.json │ │ │ ├── n_array_number_and_several_commas.json │ │ │ ├── n_array_unclosed_with_object_inside.json │ │ │ ├── n_number_U+FF11_fullwidth_digit_one.json │ │ │ ├── n_number_neg_with_garbage_at_end.json │ │ │ ├── n_object_garbage_at_end.json │ │ │ ├── n_object_trailing_comment.json │ │ │ ├── n_object_with_trailing_garbage.json │ │ │ ├── n_string_accentuated_char_no_quotes.json │ │ │ ├── n_string_escaped_backslash_bad.json │ │ │ ├── n_string_escaped_ctrl_char_tab.json │ │ │ ├── n_string_invalid_backslash_esc.json │ │ │ ├── n_string_no_quotes_with_bad_escape.json │ │ │ ├── n_string_single_quote.json │ │ │ ├── n_structure_angle_bracket_null.json │ │ │ ├── n_structure_array_trailing_garbage.json │ │ │ ├── n_structure_ascii-unicode-identifier.json │ │ │ ├── n_structure_null-byte-outside-string.json │ │ │ ├── n_structure_object_unclosed_no_value.json │ │ │ ├── n_structure_open_array_open_object.json │ │ │ ├── n_structure_open_array_open_string.json │ │ │ ├── n_structure_open_object_close_array.json │ │ │ ├── n_structure_open_object_open_array.json │ │ │ ├── n_structure_open_object_open_string.json │ │ │ ├── n_structure_open_open.json │ │ │ ├── n_structure_unclosed_object.json │ │ │ ├── y_array_heterogeneous.json │ │ │ ├── y_number_real_capital_e_neg_exp.json │ │ │ ├── y_number_real_capital_e_pos_exp.json │ │ │ ├── y_object_duplicated_key.json │ │ │ ├── y_string_backslash_doublequotes.json │ │ │ ├── y_string_escaped_noncharacter.json │ │ │ ├── y_string_nbsp_uescaped.json │ │ │ ├── y_string_nonCharacterInUTF-8_U+FFFF.json │ │ │ ├── y_structure_lonely_negative_real.json │ │ │ ├── y_structure_trailing_newline.json │ │ │ ├── i_number_double_huge_neg_exp.json │ │ │ ├── i_number_real_neg_overflow.json │ │ │ ├── i_number_real_pos_overflow.json │ │ │ ├── i_object_key_lone_2nd_surrogate.json │ │ │ ├── i_string_incomplete_surrogate_pair.json │ │ │ ├── i_string_invalid_lonely_surrogate.json │ │ │ ├── n_array_items_separated_by_semicolon.json │ │ │ ├── n_array_newlines_unclosed.json │ │ │ ├── n_array_spaces_vertical_tab_formfeed.json │ │ │ ├── n_number_invalid-negative-real.json │ │ │ ├── n_number_neg_int_starting_with_zero.json │ │ │ ├── n_number_neg_real_without_int_part.json │ │ │ ├── n_number_real_without_fractional_part.json │ │ │ ├── n_object_comma_instead_of_colon.json │ │ │ ├── n_object_key_with_single_quotes.json │ │ │ ├── n_object_several_trailing_commas.json │ │ │ ├── n_object_trailing_comment_open.json │ │ │ ├── n_string_1_surrogate_then_escape.json │ │ │ ├── n_string_incomplete_surrogate.json │ │ │ ├── n_string_invalid_unicode_escape.json │ │ │ ├── n_string_single_string_no_double_quotes.json │ │ │ ├── n_string_unescaped_newline.json │ │ │ ├── n_structure_array_with_extra_array_close.json │ │ │ ├── n_structure_array_with_unclosed_string.json │ │ │ ├── n_structure_number_with_trailing_garbage.json │ │ │ ├── n_structure_whitespace_U+2060_word_joiner.json │ │ │ ├── y_array_with_several_null.json │ │ │ ├── y_number_real_fraction_exponent.json │ │ │ ├── y_object_with_newlines.json │ │ │ ├── y_string_allowed_escapes.json │ │ │ ├── y_string_escaped_control_character.json │ │ │ ├── y_string_in_array_with_leading_space.json │ │ │ ├── y_string_nonCharacterInUTF-8_U+10FFFF.json │ │ │ ├── y_string_uEscape.json │ │ │ ├── y_string_uescaped_newline.json │ │ │ ├── y_string_unicodeEscapedBackslash.json │ │ │ ├── y_string_unicode_U+FDD0_nonchar.json │ │ │ ├── y_string_unicode_U+FFFE_nonchar.json │ │ │ ├── i_number_too_big_pos_int.json │ │ │ ├── i_string_1st_surrogate_but_2nd_missing.json │ │ │ ├── n_array_unclosed_with_new_lines.json │ │ │ ├── n_number_minus_sign_with_trailing_garbage.json │ │ │ ├── n_number_with_alpha_char.json │ │ │ ├── n_object_repeated_null_null.json │ │ │ ├── n_object_trailing_comment_slash_open.json │ │ │ ├── n_object_two_commas_in_a_row.json │ │ │ ├── n_object_with_single_string.json │ │ │ ├── n_string_1_surrogate_then_escape_u.json │ │ │ ├── n_string_1_surrogate_then_escape_u1.json │ │ │ ├── n_string_1_surrogate_then_escape_u1x.json │ │ │ ├── n_string_incomplete_escaped_character.json │ │ │ ├── n_string_leading_uescaped_thinspace.json │ │ │ ├── n_structure_object_followed_by_closing_object.json │ │ │ ├── n_structure_uescaped_LF_before_string.json │ │ │ ├── y_object_duplicated_key_and_value.json │ │ │ ├── y_object_escaped_null_in_key.json │ │ │ ├── y_string_accepted_surrogate_pair.json │ │ │ ├── y_string_backslash_and_u_escaped_zero.json │ │ │ ├── y_string_last_surrogates_1_and_2.json │ │ │ ├── y_string_reservedCharacterInUTF-8_U+1BFFF.json │ │ │ ├── y_string_unicode_U+10FFFE_nonchar.json │ │ │ ├── y_string_unicode_U+1FFFE_nonchar.json │ │ │ ├── y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json │ │ │ ├── y_string_unicode_U+2064_invisible_plus.json │ │ │ ├── y_string_unicode_escaped_double_quote.json │ │ │ ├── i_string_inverted_surrogates_U+1D11E.json │ │ │ ├── n_structure_comma_instead_of_closing_brace.json │ │ │ ├── n_structure_object_with_comment.json │ │ │ ├── n_structure_object_with_trailing_garbage.json │ │ │ ├── n_structure_open_object_string_with_apostrophes.json │ │ │ ├── n_structure_unclosed_array_partial_null.json │ │ │ ├── n_structure_unclosed_array_unfinished_false.json │ │ │ ├── n_structure_unclosed_array_unfinished_true.json │ │ │ ├── i_number_too_big_neg_int.json │ │ │ ├── i_string_1st_valid_surrogate_2nd_invalid.json │ │ │ ├── i_string_incomplete_surrogate_and_escape_valid.json │ │ │ ├── n_object_non_string_key_but_huge_number_instead.json │ │ │ ├── n_object_trailing_comment_slash_open_incomplete.json │ │ │ ├── y_object_extreme_numbers.json │ │ │ ├── y_string_1_2_3_bytes_UTF-8_sequences.json │ │ │ ├── i_string_incomplete_surrogates_escape_valid.json │ │ │ ├── n_string_incomplete_surrogate_escape_invalid.json │ │ │ ├── y_string_accepted_surrogate_pairs.json │ │ │ ├── y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json │ │ │ ├── i_number_very_big_negative_int.json │ │ │ ├── y_number_double_close_to_zero.json │ │ │ ├── y_object_long_strings.json │ │ │ ├── y_object_string_unicode.json │ │ │ ├── i_string_invalid_utf-8.json │ │ │ ├── i_string_iso_latin_1.json │ │ │ ├── n_array_a_invalid_utf8.json │ │ │ ├── n_array_invalid_utf8.json │ │ │ ├── i_string_truncated-utf-8.json │ │ │ ├── i_string_utf16BE_no_BOM.json │ │ │ ├── i_string_utf16LE_no_BOM.json │ │ │ ├── i_string_UTF-16LE_with_BOM.json │ │ │ ├── n_structure_single_eacute.json │ │ │ ├── i_number_huge_exp.json │ │ │ ├── i_string_not_in_unicode_range.json │ │ │ ├── n_number_invalid-utf-8-in-int.json │ │ │ ├── i_string_UTF-8_invalid_sequence.json │ │ │ ├── i_string_UTF8_surrogate_U+D800.json │ │ │ ├── n_string_invalid-utf-8-in-escape.json │ │ │ ├── n_structure_incomplete_UTF8_BOM.json │ │ │ ├── n_structure_lone-invalid-utf-8.json │ │ │ ├── i_string_overlong_sequence_2_bytes.json │ │ │ ├── i_string_overlong_sequence_6_bytes.json │ │ │ ├── n_number_invalid-utf-8-in-exponent.json │ │ │ ├── n_string_invalid_utf8_after_escape.json │ │ │ ├── i_string_lone_utf8_continuation_byte.json │ │ │ ├── n_number_invalid-utf-8-in-bigger-int.json │ │ │ ├── i_string_overlong_sequence_6_bytes_null.json │ │ │ ├── n_number_real_with_invalid_utf8_after_e.json │ │ │ └── n_object_lone_continuation_byte_in_key_and_trailing_comma.json │ │ ├── persons.json │ │ ├── address-book.json │ │ ├── json-exception-2.json │ │ ├── members.json │ │ ├── locations.json │ │ └── json-exception-1.json │ ├── output │ │ ├── store.cbor │ │ └── address-book-new.json │ └── src │ │ ├── utility │ │ └── from_integer_tests.cpp │ │ ├── testmain.cpp │ │ └── detail │ │ └── string_view_tests.cpp ├── jmespath │ └── input │ │ ├── test.json │ │ └── compliance │ │ ├── test.json │ │ └── current.json ├── jsonschema │ ├── JSON-Schema-Test-Suite │ │ ├── tests │ │ │ ├── latest │ │ │ ├── draft4 │ │ │ │ └── optional │ │ │ │ │ ├── float-overflow.json │ │ │ │ │ └── zeroTerminatedFloats.json │ │ │ ├── draft6 │ │ │ │ └── optional │ │ │ │ │ └── float-overflow.json │ │ │ ├── draft7 │ │ │ │ └── optional │ │ │ │ │ └── float-overflow.json │ │ │ ├── draft3 │ │ │ │ └── optional │ │ │ │ │ ├── zeroTerminatedFloats.json │ │ │ │ │ ├── format │ │ │ │ │ ├── time.json │ │ │ │ │ └── regex.json │ │ │ │ │ └── ecmascript-regex.json │ │ │ ├── draft2019-09 │ │ │ │ └── optional │ │ │ │ │ └── float-overflow.json │ │ │ ├── draft-next │ │ │ │ └── optional │ │ │ │ │ └── float-overflow.json │ │ │ └── draft2020-12 │ │ │ │ └── optional │ │ │ │ └── float-overflow.json │ │ └── remotes │ │ │ ├── integer.json │ │ │ ├── nested │ │ │ ├── string.json │ │ │ └── foo-ref-string.json │ │ │ ├── baseUriChange │ │ │ └── folderInteger.json │ │ │ ├── baseUriChangeFolder │ │ │ └── folderInteger.json │ │ │ ├── baseUriChangeFolderInSubschema │ │ │ └── folderInteger.json │ │ │ ├── draft-next │ │ │ ├── integer.json │ │ │ ├── nested │ │ │ │ ├── string.json │ │ │ │ └── foo-ref-string.json │ │ │ ├── baseUriChange │ │ │ │ └── folderInteger.json │ │ │ ├── baseUriChangeFolder │ │ │ │ └── folderInteger.json │ │ │ ├── baseUriChangeFolderInSubschema │ │ │ │ └── folderInteger.json │ │ │ ├── subSchemas.json │ │ │ ├── locationIndependentIdentifier.json │ │ │ ├── detached-ref.json │ │ │ ├── detached-dynamicref.json │ │ │ ├── ref-and-defs.json │ │ │ ├── name-defs.json │ │ │ ├── tree.json │ │ │ ├── metaschema-no-validation.json │ │ │ ├── format-assertion-true.json │ │ │ ├── format-assertion-false.json │ │ │ ├── metaschema-optional-vocabulary.json │ │ │ └── extendible-dynamic-ref.json │ │ │ ├── draft2019-09 │ │ │ ├── integer.json │ │ │ ├── nested │ │ │ │ ├── string.json │ │ │ │ └── foo-ref-string.json │ │ │ ├── baseUriChange │ │ │ │ └── folderInteger.json │ │ │ ├── baseUriChangeFolder │ │ │ │ └── folderInteger.json │ │ │ ├── baseUriChangeFolderInSubschema │ │ │ │ └── folderInteger.json │ │ │ ├── dependentRequired.json │ │ │ ├── ignore-prefixItems.json │ │ │ ├── subSchemas.json │ │ │ ├── locationIndependentIdentifier.json │ │ │ ├── detached-ref.json │ │ │ ├── ref-and-defs.json │ │ │ ├── name-defs.json │ │ │ ├── tree.json │ │ │ ├── metaschema-no-validation.json │ │ │ ├── metaschema-optional-vocabulary.json │ │ │ └── extendible-dynamic-ref.json │ │ │ ├── draft2020-12 │ │ │ ├── integer.json │ │ │ ├── nested │ │ │ │ ├── string.json │ │ │ │ └── foo-ref-string.json │ │ │ ├── baseUriChange │ │ │ │ └── folderInteger.json │ │ │ ├── baseUriChangeFolder │ │ │ │ └── folderInteger.json │ │ │ ├── baseUriChangeFolderInSubschema │ │ │ │ └── folderInteger.json │ │ │ ├── prefixItems.json │ │ │ ├── subSchemas.json │ │ │ ├── locationIndependentIdentifier.json │ │ │ ├── detached-ref.json │ │ │ ├── detached-dynamicref.json │ │ │ ├── ref-and-defs.json │ │ │ ├── name-defs.json │ │ │ ├── tree.json │ │ │ ├── metaschema-no-validation.json │ │ │ ├── format-assertion-false.json │ │ │ ├── format-assertion-true.json │ │ │ ├── metaschema-optional-vocabulary.json │ │ │ └── extendible-dynamic-ref.json │ │ │ ├── urn-ref-string.json │ │ │ ├── different-id-ref-string.json │ │ │ ├── draft7 │ │ │ ├── ignore-dependentRequired.json │ │ │ └── detached-ref.json │ │ │ ├── subSchemas.json │ │ │ ├── locationIndependentIdentifier.json │ │ │ ├── locationIndependentIdentifierDraft4.json │ │ │ ├── locationIndependentIdentifierPre2019.json │ │ │ ├── nested-absolute-ref-to-string.json │ │ │ ├── ref-and-defs.json │ │ │ ├── ref-and-definitions.json │ │ │ ├── draft6 │ │ │ └── detached-ref.json │ │ │ ├── name-defs.json │ │ │ ├── name.json │ │ │ ├── tree.json │ │ │ └── extendible-dynamic-ref.json │ ├── baseUriChange │ │ └── folderInteger.json │ ├── baseUriChangeFolder │ │ └── folderInteger.json │ ├── baseUriChangeFolderInSubschema │ │ └── folderInteger.json │ ├── more_tests │ │ └── draft2020-12 │ │ │ └── README │ └── issues │ │ ├── draft2019-09 │ │ └── issue-ref.txt │ │ └── draft2020-12 │ │ ├── issue-ref.txt │ │ ├── issue-email.json │ │ ├── issue-uri.json │ │ └── issue-unevaluatedItems.json ├── csv │ └── input │ │ ├── desktop.ini │ │ ├── countries.csv │ │ ├── countries.json │ │ └── employees.txt ├── fuzz_regression │ └── input │ │ ├── clusterfuzz-testcase-minimized-fuzz_csv-4925110364733440 │ │ ├── clusterfuzz-testcase-minimized-fuzz_ubjson-5667315455361024 │ │ ├── clusterfuzz-testcase-minimized-fuzz_ubjson-5751108612653056 │ │ ├── clusterfuzz-testcase-minimized-fuzz_csv-5762751990595584 │ │ ├── clusterfuzz-testcase-minimized-fuzz_json_cursor-5656793396150272 │ │ ├── clusterfuzz-testcase-minimized-fuzz_json_cursor-5686693027119104 │ │ ├── clusterfuzz-testcase-minimized-fuzz_csv_encoder-5202115606872064.fuzz │ │ ├── clusterfuzz-testcase-minimized-fuzz_json_cursor-6585089218707456 │ │ ├── clusterfuzz-testcase-minimized-fuzz_parse-5981995560730624.fuzz │ │ ├── clusterfuzz-testcase-minimized-fuzz_csv_encoder-5699775833047040 │ │ ├── clusterfuzz-testcase-minimized-fuzz_csv_encoder-5682837304115200.fuzz │ │ ├── clusterfuzz-testcase-minimized-fuzz_json_encoder-5639543840702464 │ │ ├── clusterfuzz-testcase-fuzz_bson-5637264110780416 │ │ ├── clusterfuzz-testcase-fuzz_cbor-5141282369568768 │ │ ├── clusterfuzz-testcase-fuzz_cbor-5687592176844800 │ │ ├── clusterfuzz-testcase-fuzz_msgpack-5727715157344256 │ │ ├── clusterfuzz-testcase-fuzz_ubjson-5681659887484928 │ │ ├── clusterfuzz-testcase-fuzz_cbor_encoder-5665976638242816 │ │ ├── clusterfuzz-testcase-fuzz_cbor_encoder-5673305546948608 │ │ ├── clusterfuzz-testcase-fuzz_cbor_encoder-5681910597812224 │ │ ├── clusterfuzz-testcase-fuzz_cbor_encoder-5685492533428224 │ │ ├── clusterfuzz-testcase-fuzz_msgpack_encoder-5677646685143040 │ │ ├── clusterfuzz-testcase-minimized-fuzz_cbor-5171679883165696 │ │ ├── clusterfuzz-testcase-minimized-fuzz_cbor-5639265590706176 │ │ ├── clusterfuzz-testcase-minimized-fuzz_cbor-5743359164678144 │ │ ├── clusterfuzz-testcase-minimized-fuzz_msgpack-5651190114418688 │ │ ├── clusterfuzz-testcase-minimized-fuzz_ubjson-5737197673381888 │ │ ├── clusterfuzz-testcase-minimized-fuzz_ubjson-5738905124208640 │ │ ├── clusterfuzz-testcase-minimized-fuzz_cbor-5740910806827008.fuzz │ │ ├── clusterfuzz-testcase-minimized-fuzz_bson_encoder-5420549982519296 │ │ ├── clusterfuzz-testcase-minimized-fuzz_cbor_encoder-4729089884225536 │ │ ├── clusterfuzz-testcase-minimized-fuzz_cbor_encoder-6266427819687936 │ │ ├── clusterfuzz-testcase-minimized-fuzz_csv_encoder-4850580052312064 │ │ ├── clusterfuzz-testcase-minimized-fuzz_msgpack_encoder-5091553277706240 │ │ ├── clusterfuzz-testcase-minimized-fuzz_ubjson_encoder-5711604342849536 │ │ └── clusterfuzz-testcase-minimized-fuzz_msgpack_parser_max-6248108141576192 ├── jsonpath │ └── input │ │ └── test.json └── common │ └── test_utilities.hpp ├── examples ├── output │ ├── xxx.txt │ ├── tasks.csv │ ├── new-address-book1.json │ ├── new-address-book2.json │ └── export_settings.json ├── input │ ├── multiple-json-objects.json │ ├── countries.json │ ├── tasks.csv │ ├── sales.csv │ ├── address-book.json │ └── jsonschema │ │ └── name-defs.json └── build │ └── cmake │ ├── run_examples_vc140x64.cmd │ ├── build_vc140x64.cmd │ └── README.txt ├── acknowledgements.md ├── .github ├── FUNDING.yml ├── btn_support.PNG ├── dependabot.yml └── ISSUE_TEMPLATE │ ├── config.yml │ ├── feature_request.md │ └── bug_report.md ├── doc ├── ref │ ├── bson │ │ ├── decode_bson.md │ │ ├── encode_bson.md │ │ └── diagrams │ │ │ ├── bson_options.png │ │ │ └── basic_bson_encoder.png │ ├── corelib │ │ ├── json │ │ │ ├── as.md │ │ │ ├── operator_at.md │ │ │ ├── destructor.md │ │ │ ├── operator=.md │ │ │ └── emplace_back.md │ │ ├── basic_json_options.md │ │ ├── diagrams │ │ │ ├── conv_error.png │ │ │ ├── ser_error.png │ │ │ ├── json_decoder.png │ │ │ ├── basic_json_encoder.png │ │ │ ├── basic_json_filter.png │ │ │ ├── basic_json_options.png │ │ │ ├── basic_default_json_visitor.png │ │ │ └── rename_object_key_filter.png │ │ ├── line_split_kind.md │ │ ├── spaces_option.md │ │ ├── indenting.md │ │ ├── float_chars_format.md │ │ ├── half_arg.md │ │ ├── json_array_arg.md │ │ ├── byte_string_arg.md │ │ ├── json_object_arg.md │ │ ├── half_arg_t.md │ │ ├── json_array_arg_t.md │ │ ├── byte_string_arg_t.md │ │ ├── json_object_arg_t.md │ │ ├── conversion_error.md │ │ ├── staj_event_type.md │ │ └── semantic_tag.md │ ├── cbor │ │ └── diagrams │ │ │ ├── cbor_options.png │ │ │ └── basic_cbor_encoder.png │ ├── csv │ │ ├── diagrams │ │ │ ├── basic_csv_encoder.png │ │ │ └── basic_csv_options.png │ │ ├── csv_mapping_kind.md │ │ └── quote_style_kind.md │ ├── ubjson │ │ └── diagrams │ │ │ ├── ubjson_options.png │ │ │ └── basic_ubjson_encoder.png │ ├── jmespath │ │ └── diagrams │ │ │ └── jmespath_error.png │ ├── jsonpath │ │ ├── diagrams │ │ │ └── jsonpath_error.png │ │ ├── functions │ │ │ ├── abs.md │ │ │ ├── keys.md │ │ │ ├── prod.md │ │ │ ├── ends_with.md │ │ │ ├── starts_with.md │ │ │ ├── to_number.md │ │ │ ├── min.md │ │ │ └── max.md │ │ └── path_node_kind.md │ ├── jsonschema │ │ ├── diagrams │ │ │ ├── schema_error.png │ │ │ └── validation_error.png │ │ ├── walk_result.md │ │ ├── schema_error.md │ │ ├── validation_error.md │ │ └── schema_version.md │ ├── msgpack │ │ └── diagrams │ │ │ ├── msgpack_options.png │ │ │ └── basic_msgpack_encoder.png │ ├── jsonpatch │ │ └── diagrams │ │ │ └── jsonpatch_error.png │ └── jsonpointer │ │ ├── diagrams │ │ └── jsonpointer_error.png │ │ └── unflatten_options.md └── build.md ├── SECURITY.md ├── Roadmap.md ├── fuzzers ├── fuzz_parse.cpp ├── fuzz_json_parser_max.cpp ├── fuzz_json_encoder.cpp ├── fuzz_bson.cpp ├── fuzz_bson_parser_max.cpp ├── fuzz_csv_encoder.cpp ├── fuzz_msgpack.cpp ├── fuzz_ubjson.cpp ├── fuzz_cbor_parser_max.cpp ├── fuzz_msgpack_parser_max.cpp ├── fuzz_bson_encoder.cpp ├── fuzz_ubjson_parser_max.cpp ├── fuzz_cbor_encoder.cpp ├── fuzz_ubjson_encoder.cpp ├── fuzz_msgpack_encoder.cpp ├── fuzz_bigint.cpp └── fuzz_cbor.cpp ├── examples_boost └── more_examples.cpp ├── .circleci └── config.yml ├── include ├── jsoncons_ext │ ├── jsonschema │ │ └── jsonschema.hpp │ ├── jsonpath │ │ └── jsonpath.hpp │ ├── bson │ │ └── bson.hpp │ ├── cbor │ │ └── cbor.hpp │ ├── csv │ │ └── csv.hpp │ ├── ubjson │ │ └── ubjson.hpp │ └── msgpack │ │ └── msgpack.hpp └── jsoncons │ └── json.hpp ├── .clang-tidy └── cmake └── Config.cmake /test/bson/input/test1.bson: -------------------------------------------------------------------------------- 1 | int -------------------------------------------------------------------------------- /test/bson/input/test18.bson: -------------------------------------------------------------------------------- 1 | 2 | hello -------------------------------------------------------------------------------- /test/bson/input/test19.bson: -------------------------------------------------------------------------------- 1 | bool -------------------------------------------------------------------------------- /test/bson/input/test25.bson: -------------------------------------------------------------------------------- 1 | undefined -------------------------------------------------------------------------------- /test/bson/input/test37.bson: -------------------------------------------------------------------------------- 1 | maxkey -------------------------------------------------------------------------------- /test/bson/input/test40.bson: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /test/bson/input/test42.bson: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /test/bson/input/test46.bson: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/bson/input/test9.bson: -------------------------------------------------------------------------------- 1 | 2 | null -------------------------------------------------------------------------------- /test/bson/input/test10.bson: -------------------------------------------------------------------------------- 1 |  regex1234i -------------------------------------------------------------------------------- /test/bson/input/test2.bson: -------------------------------------------------------------------------------- 1 | int64 -------------------------------------------------------------------------------- /test/bson/input/test21.bson: -------------------------------------------------------------------------------- 1 | document -------------------------------------------------------------------------------- /test/bson/input/test59.bson: -------------------------------------------------------------------------------- 1 | . -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail29.json: -------------------------------------------------------------------------------- 1 | [0e] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail30.json: -------------------------------------------------------------------------------- 1 | [0e+] -------------------------------------------------------------------------------- /test/jmespath/input/test.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] 3 | 4 | -------------------------------------------------------------------------------- /test/bson/input/test11.bson: -------------------------------------------------------------------------------- 1 | helloworld -------------------------------------------------------------------------------- /test/bson/input/test27.bson: -------------------------------------------------------------------------------- 1 |  regex^abcdilx -------------------------------------------------------------------------------- /test/bson/input/test32.bson: -------------------------------------------------------------------------------- 1 | helloworld -------------------------------------------------------------------------------- /test/bson/input/test57.bson: -------------------------------------------------------------------------------- 1 | binary1234 -------------------------------------------------------------------------------- /test/bson/input/test58.bson: -------------------------------------------------------------------------------- 1 | a -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_+1.json: -------------------------------------------------------------------------------- 1 | [+1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_0e.json: -------------------------------------------------------------------------------- 1 | [0e] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_single_space.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_array_empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail16.json: -------------------------------------------------------------------------------- 1 | [\naked] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail31.json: -------------------------------------------------------------------------------- 1 | [0e+-1] -------------------------------------------------------------------------------- /test/bson/input/test29.bson: -------------------------------------------------------------------------------- 1 |  code var a = {}; -------------------------------------------------------------------------------- /test/bson/input/test30.bson: -------------------------------------------------------------------------------- 1 |  code var a = {}; -------------------------------------------------------------------------------- /test/bson/input/test48.bson: -------------------------------------------------------------------------------- 1 |   -------------------------------------------------------------------------------- /test/bson/input/test5.bson: -------------------------------------------------------------------------------- 1 | string some string -------------------------------------------------------------------------------- /test/bson/input/test50.bson: -------------------------------------------------------------------------------- 1 |   -------------------------------------------------------------------------------- /test/bson/input/test8.bson: -------------------------------------------------------------------------------- 1 | documentint -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_unclosed.json: -------------------------------------------------------------------------------- 1 | ["" -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_++.json: -------------------------------------------------------------------------------- 1 | [++1234] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_+Inf.json: -------------------------------------------------------------------------------- 1 | [+Inf] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_-01.json: -------------------------------------------------------------------------------- 1 | [-01] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_-2..json: -------------------------------------------------------------------------------- 1 | [-2.] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_-NaN.json: -------------------------------------------------------------------------------- 1 | [-NaN] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_.-1.json: -------------------------------------------------------------------------------- 1 | [.-1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_0.3e.json: -------------------------------------------------------------------------------- 1 | [0.3e] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_0.e1.json: -------------------------------------------------------------------------------- 1 | [0.e1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_0e+.json: -------------------------------------------------------------------------------- 1 | [0e+] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_1.0e.json: -------------------------------------------------------------------------------- 1 | [1.0e] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_1eE2.json: -------------------------------------------------------------------------------- 1 | [1eE2] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_2.e3.json: -------------------------------------------------------------------------------- 1 | [2.e3] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_9.e+.json: -------------------------------------------------------------------------------- 1 | [9.e+] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_Inf.json: -------------------------------------------------------------------------------- 1 | [Inf] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_NaN.json: -------------------------------------------------------------------------------- 1 | [NaN] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_emoji.json: -------------------------------------------------------------------------------- 1 | {🇨🇭} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_no_data.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_array_false.json: -------------------------------------------------------------------------------- 1 | [false] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_array_null.json: -------------------------------------------------------------------------------- 1 | [null] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number.json: -------------------------------------------------------------------------------- 1 | [123e65] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_0e+1.json: -------------------------------------------------------------------------------- 1 | [0e+1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_0e1.json: -------------------------------------------------------------------------------- 1 | [0e1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_object_empty.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_pi.json: -------------------------------------------------------------------------------- 1 | ["π"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_space.json: -------------------------------------------------------------------------------- 1 | " " -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_utf8.json: -------------------------------------------------------------------------------- 1 | ["€𝄞"] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail33.json: -------------------------------------------------------------------------------- 1 | ["mismatch"} -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail4.json: -------------------------------------------------------------------------------- 1 | ["extra comma",] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail8.json: -------------------------------------------------------------------------------- 1 | ["Extra close"]] -------------------------------------------------------------------------------- /test/bson/input/test13.bson: -------------------------------------------------------------------------------- 1 | #array[bool]012 -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_extra_close.json: -------------------------------------------------------------------------------- 1 | ["x"]] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_extra_comma.json: -------------------------------------------------------------------------------- 1 | ["",] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_incomplete.json: -------------------------------------------------------------------------------- 1 | ["x" -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_just_comma.json: -------------------------------------------------------------------------------- 1 | [,] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_just_minus.json: -------------------------------------------------------------------------------- 1 | [-] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_star_inside.json: -------------------------------------------------------------------------------- 1 | [*] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_incomplete_false.json: -------------------------------------------------------------------------------- 1 | [fals] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_incomplete_null.json: -------------------------------------------------------------------------------- 1 | [nul] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_incomplete_true.json: -------------------------------------------------------------------------------- 1 | [tru] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_-1.0..json: -------------------------------------------------------------------------------- 1 | [-1.0.] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_.2e-3.json: -------------------------------------------------------------------------------- 1 | [.2e-3] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_0.1.2.json: -------------------------------------------------------------------------------- 1 | [0.1.2] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_0.3e+.json: -------------------------------------------------------------------------------- 1 | [0.3e+] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_0_capital_E.json: -------------------------------------------------------------------------------- 1 | [0E] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_1.0e+.json: -------------------------------------------------------------------------------- 1 | [1.0e+] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_1.0e-.json: -------------------------------------------------------------------------------- 1 | [1.0e-] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_1_000.json: -------------------------------------------------------------------------------- 1 | [1 000.0] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_2.e+3.json: -------------------------------------------------------------------------------- 1 | [2.e+3] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_2.e-3.json: -------------------------------------------------------------------------------- 1 | [2.e-3] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_expression.json: -------------------------------------------------------------------------------- 1 | [1+2] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_hex_1_digit.json: -------------------------------------------------------------------------------- 1 | [0x1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_invalid+-.json: -------------------------------------------------------------------------------- 1 | [0e+-1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_no-colon.json: -------------------------------------------------------------------------------- 1 | {"a" -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_escape_x.json: -------------------------------------------------------------------------------- 1 | ["\x00"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_end_array.json: -------------------------------------------------------------------------------- 1 | ] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_open_object.json: -------------------------------------------------------------------------------- 1 | { -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_single_star.json: -------------------------------------------------------------------------------- 1 | * -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_array_empty-string.json: -------------------------------------------------------------------------------- 1 | [""] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_after_space.json: -------------------------------------------------------------------------------- 1 | [ 4] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_minus_zero.json: -------------------------------------------------------------------------------- 1 | [-0] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_negative_one.json: -------------------------------------------------------------------------------- 1 | [-1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_simple_int.json: -------------------------------------------------------------------------------- 1 | [123] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_object_empty_key.json: -------------------------------------------------------------------------------- 1 | {"":0} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_object_simple.json: -------------------------------------------------------------------------------- 1 | {"a":[]} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_in_array.json: -------------------------------------------------------------------------------- 1 | ["asd"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_unicode_2.json: -------------------------------------------------------------------------------- 1 | ["⍂㈴⍂"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_structure_lonely_int.json: -------------------------------------------------------------------------------- 1 | 42 -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail2.json: -------------------------------------------------------------------------------- 1 | ["Unclosed array" -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail23.json: -------------------------------------------------------------------------------- 1 | ["Bad value", truth] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail24.json: -------------------------------------------------------------------------------- 1 | ['single quote'] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail27.json: -------------------------------------------------------------------------------- 1 | ["line 2 | break"] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail28.json: -------------------------------------------------------------------------------- 1 | ["line\ 2 | break"] -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/tests/latest: -------------------------------------------------------------------------------- 1 | draft2020-12 -------------------------------------------------------------------------------- /examples/output/xxx.txt: -------------------------------------------------------------------------------- 1 | [ 2 | "\u007F\u07FF\u0800" 3 | ] 4 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_comma_after_close.json: -------------------------------------------------------------------------------- 1 | [""], -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_comma_and_number.json: -------------------------------------------------------------------------------- 1 | [,1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_double_comma.json: -------------------------------------------------------------------------------- 1 | [1,,2] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_missing_value.json: -------------------------------------------------------------------------------- 1 | [ , ""] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_number_and_comma.json: -------------------------------------------------------------------------------- 1 | [1,] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_0_capital_E+.json: -------------------------------------------------------------------------------- 1 | [0E+] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_hex_2_digits.json: -------------------------------------------------------------------------------- 1 | [0x42] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_infinity.json: -------------------------------------------------------------------------------- 1 | [Infinity] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_minus_space_1.json: -------------------------------------------------------------------------------- 1 | [- 1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_with_alpha.json: -------------------------------------------------------------------------------- 1 | [1.2a-3] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_bad_value.json: -------------------------------------------------------------------------------- 1 | ["x", truth] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_missing_colon.json: -------------------------------------------------------------------------------- 1 | {"a" b} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_missing_key.json: -------------------------------------------------------------------------------- 1 | {:"b"} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_missing_value.json: -------------------------------------------------------------------------------- 1 | {"a": -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_non_string_key.json: -------------------------------------------------------------------------------- 1 | {1:1} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_single_quote.json: -------------------------------------------------------------------------------- 1 | {'a':0} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_unquoted_key.json: -------------------------------------------------------------------------------- 1 | {a: "b"} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_backslash_00.json: -------------------------------------------------------------------------------- 1 | ["\"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_escaped_emoji.json: -------------------------------------------------------------------------------- 1 | ["\🌀"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_single_doublequote.json: -------------------------------------------------------------------------------- 1 | " -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_unescaped_tab.json: -------------------------------------------------------------------------------- 1 | [" "] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_UTF8_BOM_no_data.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_angle_bracket_..json: -------------------------------------------------------------------------------- 1 | <.> -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_double_array.json: -------------------------------------------------------------------------------- 1 | [][] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_lone-open-bracket.json: -------------------------------------------------------------------------------- 1 | [ -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_open_array_comma.json: -------------------------------------------------------------------------------- 1 | [, -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_unclosed_array.json: -------------------------------------------------------------------------------- 1 | [1 -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_array_with_leading_space.json: -------------------------------------------------------------------------------- 1 | [1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_int_with_exp.json: -------------------------------------------------------------------------------- 1 | [20e1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_negative_int.json: -------------------------------------------------------------------------------- 1 | [-123] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_negative_zero.json: -------------------------------------------------------------------------------- 1 | [-0] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_real_capital_e.json: -------------------------------------------------------------------------------- 1 | [1E22] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_real_exponent.json: -------------------------------------------------------------------------------- 1 | [123e45] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_real_neg_exp.json: -------------------------------------------------------------------------------- 1 | [1e-2] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_object_basic.json: -------------------------------------------------------------------------------- 1 | {"asd":"sdf"} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_null_escape.json: -------------------------------------------------------------------------------- 1 | ["\u0000"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_simple_ascii.json: -------------------------------------------------------------------------------- 1 | ["asd "] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_u+2028_line_sep.json: -------------------------------------------------------------------------------- 1 | ["
"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_u+2029_par_sep.json: -------------------------------------------------------------------------------- 1 | ["
"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_unicode.json: -------------------------------------------------------------------------------- 1 | ["\uA66D"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_structure_lonely_false.json: -------------------------------------------------------------------------------- 1 | false -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_structure_lonely_null.json: -------------------------------------------------------------------------------- 1 | null -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_structure_lonely_string.json: -------------------------------------------------------------------------------- 1 | "asd" -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_structure_lonely_true.json: -------------------------------------------------------------------------------- 1 | true -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_structure_string_empty.json: -------------------------------------------------------------------------------- 1 | "" -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail19.json: -------------------------------------------------------------------------------- 1 | {"Missing colon" null} -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail20.json: -------------------------------------------------------------------------------- 1 | {"Double colon":: null} -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail5.json: -------------------------------------------------------------------------------- 1 | ["double extra comma",,] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail6.json: -------------------------------------------------------------------------------- 1 | [ , "<-- missing value"] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail7.json: -------------------------------------------------------------------------------- 1 | ["Comma after the close"], -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail9.json: -------------------------------------------------------------------------------- 1 | {"Extra comma": true,} -------------------------------------------------------------------------------- /test/bson/input/test16.bson: -------------------------------------------------------------------------------- 1 | array[null] 2 | 0 3 | 1 4 | 2 -------------------------------------------------------------------------------- /test/bson/input/test23.bson: -------------------------------------------------------------------------------- 1 | +array0hello1world -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_number_neg_int_huge_exp.json: -------------------------------------------------------------------------------- 1 | [-1e+9999] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_double_extra_comma.json: -------------------------------------------------------------------------------- 1 | ["x",,] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_incomplete_invalid_value.json: -------------------------------------------------------------------------------- 1 | [x -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_inner_array_no_comma.json: -------------------------------------------------------------------------------- 1 | [3[4]] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_unclosed_trailing_comma.json: -------------------------------------------------------------------------------- 1 | [1, -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_multidigit_number_then_00.json: -------------------------------------------------------------------------------- 1 | 123 -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_minus_infinity.json: -------------------------------------------------------------------------------- 1 | [-Infinity] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_real_garbage_after_e.json: -------------------------------------------------------------------------------- 1 | [1ea] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_starting_with_dot.json: -------------------------------------------------------------------------------- 1 | [.123] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_with_leading_zero.json: -------------------------------------------------------------------------------- 1 | [012] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_bracket_key.json: -------------------------------------------------------------------------------- 1 | {[: "x"} 2 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_double_colon.json: -------------------------------------------------------------------------------- 1 | {"x"::"b"} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_missing_semicolon.json: -------------------------------------------------------------------------------- 1 | {"a" "b"} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_trailing_comma.json: -------------------------------------------------------------------------------- 1 | {"id":0,} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_unterminated-value.json: -------------------------------------------------------------------------------- 1 | {"a":"a -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_incomplete_escape.json: -------------------------------------------------------------------------------- 1 | ["\"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_start_escape_unclosed.json: -------------------------------------------------------------------------------- 1 | ["\ -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_unescaped_crtl_char.json: -------------------------------------------------------------------------------- 1 | ["aa"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_unicode_CapitalU.json: -------------------------------------------------------------------------------- 1 | "\UA66D" -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | ""x -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_U+2060_word_joined.json: -------------------------------------------------------------------------------- 1 | [⁠] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_capitalized_True.json: -------------------------------------------------------------------------------- 1 | [True] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_close_unopened_array.json: -------------------------------------------------------------------------------- 1 | 1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_open_array_apostrophe.json: -------------------------------------------------------------------------------- 1 | [' -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_open_array_string.json: -------------------------------------------------------------------------------- 1 | ["a" -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_open_object_comma.json: -------------------------------------------------------------------------------- 1 | {, -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_trailing_#.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}#{} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_unicode-identifier.json: -------------------------------------------------------------------------------- 1 | å -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_whitespace_formfeed.json: -------------------------------------------------------------------------------- 1 | [ ] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_array_arraysWithSpaces.json: -------------------------------------------------------------------------------- 1 | [[] ] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_array_ending_with_newline.json: -------------------------------------------------------------------------------- 1 | ["a"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_array_with_1_and_newline.json: -------------------------------------------------------------------------------- 1 | [1 2 | ] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_array_with_trailing_space.json: -------------------------------------------------------------------------------- 1 | [2] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_real_pos_exponent.json: -------------------------------------------------------------------------------- 1 | [1e+2] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_simple_real.json: -------------------------------------------------------------------------------- 1 | [123.456789] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_object.json: -------------------------------------------------------------------------------- 1 | {"asd":"sdf", "dfg":"fgh"} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_comments.json: -------------------------------------------------------------------------------- 1 | ["a/*b*/c/*d//e"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_double_escape_a.json: -------------------------------------------------------------------------------- 1 | ["\\a"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_double_escape_n.json: -------------------------------------------------------------------------------- 1 | ["\\n"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_one-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u002c"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_three-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u0821"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_two-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u0123"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_unescaped_char_delete.json: -------------------------------------------------------------------------------- 1 | [""] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_with_del_character.json: -------------------------------------------------------------------------------- 1 | ["aa"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_structure_true_in_array.json: -------------------------------------------------------------------------------- 1 | [true] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_structure_whitespace_array.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail11.json: -------------------------------------------------------------------------------- 1 | {"Illegal expression": 1 + 2} -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail25.json: -------------------------------------------------------------------------------- 1 | [" tab character in string "] -------------------------------------------------------------------------------- /test/bson/input/test14.bson: -------------------------------------------------------------------------------- 1 | 3array[string]0hello1world -------------------------------------------------------------------------------- /test/bson/input/test31.bson: -------------------------------------------------------------------------------- 1 | 1code& var a = {};foobar -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_number_pos_double_huge_exp.json: -------------------------------------------------------------------------------- 1 | [1.5e+9999] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_number_real_underflow.json: -------------------------------------------------------------------------------- 1 | [123e-10000000] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_invalid_surrogate.json: -------------------------------------------------------------------------------- 1 | ["\ud800abc"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_lone_second_surrogate.json: -------------------------------------------------------------------------------- 1 | ["\uDFAA"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_structure_UTF-8_BOM_empty_object.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_1_true_without_comma.json: -------------------------------------------------------------------------------- 1 | [1 true] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_colon_instead_of_comma.json: -------------------------------------------------------------------------------- 1 | ["": 1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_number_and_several_commas.json: -------------------------------------------------------------------------------- 1 | [1,,] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_unclosed_with_object_inside.json: -------------------------------------------------------------------------------- 1 | [{} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_U+FF11_fullwidth_digit_one.json: -------------------------------------------------------------------------------- 1 | [1] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_neg_with_garbage_at_end.json: -------------------------------------------------------------------------------- 1 | [-1x] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_garbage_at_end.json: -------------------------------------------------------------------------------- 1 | {"a":"a" 123} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_trailing_comment.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}/**/ -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}# -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_accentuated_char_no_quotes.json: -------------------------------------------------------------------------------- 1 | [é] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_escaped_backslash_bad.json: -------------------------------------------------------------------------------- 1 | ["\\\"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_escaped_ctrl_char_tab.json: -------------------------------------------------------------------------------- 1 | ["\ "] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_invalid_backslash_esc.json: -------------------------------------------------------------------------------- 1 | ["\a"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_no_quotes_with_bad_escape.json: -------------------------------------------------------------------------------- 1 | [\n] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_single_quote.json: -------------------------------------------------------------------------------- 1 | ['single quote'] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_angle_bracket_null.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_array_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | [1]x -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_ascii-unicode-identifier.json: -------------------------------------------------------------------------------- 1 | aå -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_null-byte-outside-string.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_object_unclosed_no_value.json: -------------------------------------------------------------------------------- 1 | {"": -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_open_array_open_object.json: -------------------------------------------------------------------------------- 1 | [{ -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_open_array_open_string.json: -------------------------------------------------------------------------------- 1 | ["a -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_open_object_close_array.json: -------------------------------------------------------------------------------- 1 | {] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_open_object_open_array.json: -------------------------------------------------------------------------------- 1 | {[ -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_open_object_open_string.json: -------------------------------------------------------------------------------- 1 | {"a -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_open_open.json: -------------------------------------------------------------------------------- 1 | ["\{["\{["\{["\{ -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_unclosed_object.json: -------------------------------------------------------------------------------- 1 | {"asd":"asd" -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_array_heterogeneous.json: -------------------------------------------------------------------------------- 1 | [null, 1, "1", {}] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_real_capital_e_neg_exp.json: -------------------------------------------------------------------------------- 1 | [1E-2] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_real_capital_e_pos_exp.json: -------------------------------------------------------------------------------- 1 | [1E+2] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_object_duplicated_key.json: -------------------------------------------------------------------------------- 1 | {"a":"b","a":"c"} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_backslash_doublequotes.json: -------------------------------------------------------------------------------- 1 | ["\""] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_escaped_noncharacter.json: -------------------------------------------------------------------------------- 1 | ["\uFFFF"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_nbsp_uescaped.json: -------------------------------------------------------------------------------- 1 | ["new\u00A0line"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_nonCharacterInUTF-8_U+FFFF.json: -------------------------------------------------------------------------------- 1 | ["￿"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_structure_lonely_negative_real.json: -------------------------------------------------------------------------------- 1 | -0.1 -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_structure_trailing_newline.json: -------------------------------------------------------------------------------- 1 | ["a"] 2 | -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail12.json: -------------------------------------------------------------------------------- 1 | {"Illegal invocation": alert()} -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail14.json: -------------------------------------------------------------------------------- 1 | {"Numbers cannot be hex": 0x14} -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail15.json: -------------------------------------------------------------------------------- 1 | ["Illegal backslash escape: \x15"] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail17.json: -------------------------------------------------------------------------------- 1 | ["Illegal backslash escape: \017"] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail21.json: -------------------------------------------------------------------------------- 1 | {"Comma instead of colon", null} -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail22.json: -------------------------------------------------------------------------------- 1 | ["Colon instead of comma": false] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_number_double_huge_neg_exp.json: -------------------------------------------------------------------------------- 1 | [123.456e-789] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_number_real_neg_overflow.json: -------------------------------------------------------------------------------- 1 | [-123123e100000] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_number_real_pos_overflow.json: -------------------------------------------------------------------------------- 1 | [123123e100000] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_object_key_lone_2nd_surrogate.json: -------------------------------------------------------------------------------- 1 | {"\uDFAA":0} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_incomplete_surrogate_pair.json: -------------------------------------------------------------------------------- 1 | ["\uDd1ea"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_invalid_lonely_surrogate.json: -------------------------------------------------------------------------------- 1 | ["\ud800"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_items_separated_by_semicolon.json: -------------------------------------------------------------------------------- 1 | [1:2] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_newlines_unclosed.json: -------------------------------------------------------------------------------- 1 | ["a", 2 | 4 3 | ,1, -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_spaces_vertical_tab_formfeed.json: -------------------------------------------------------------------------------- 1 | [" a"\f] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_invalid-negative-real.json: -------------------------------------------------------------------------------- 1 | [-123.123foo] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_neg_int_starting_with_zero.json: -------------------------------------------------------------------------------- 1 | [-012] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_neg_real_without_int_part.json: -------------------------------------------------------------------------------- 1 | [-.123] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_real_without_fractional_part.json: -------------------------------------------------------------------------------- 1 | [1.] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_comma_instead_of_colon.json: -------------------------------------------------------------------------------- 1 | {"x", null} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_key_with_single_quotes.json: -------------------------------------------------------------------------------- 1 | {key: 'value'} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_several_trailing_commas.json: -------------------------------------------------------------------------------- 1 | {"id":0,,,,,} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_trailing_comment_open.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}/**// -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_1_surrogate_then_escape.json: -------------------------------------------------------------------------------- 1 | ["\uD800\"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_incomplete_surrogate.json: -------------------------------------------------------------------------------- 1 | ["\uD834\uDd"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_invalid_unicode_escape.json: -------------------------------------------------------------------------------- 1 | ["\uqqqq"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_single_string_no_double_quotes.json: -------------------------------------------------------------------------------- 1 | abc -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_unescaped_newline.json: -------------------------------------------------------------------------------- 1 | ["new 2 | line"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_array_with_extra_array_close.json: -------------------------------------------------------------------------------- 1 | [1]] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_array_with_unclosed_string.json: -------------------------------------------------------------------------------- 1 | ["asd] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_number_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | 2@ -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_whitespace_U+2060_word_joiner.json: -------------------------------------------------------------------------------- 1 | [⁠] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_array_with_several_null.json: -------------------------------------------------------------------------------- 1 | [1,null,null,null,2] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_real_fraction_exponent.json: -------------------------------------------------------------------------------- 1 | [123.456e78] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_object_with_newlines.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": "b" 3 | } -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_allowed_escapes.json: -------------------------------------------------------------------------------- 1 | ["\"\\\/\b\f\n\r\t"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_escaped_control_character.json: -------------------------------------------------------------------------------- 1 | ["\u0012"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_in_array_with_leading_space.json: -------------------------------------------------------------------------------- 1 | [ "asd"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_nonCharacterInUTF-8_U+10FFFF.json: -------------------------------------------------------------------------------- 1 | ["􏿿"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_uEscape.json: -------------------------------------------------------------------------------- 1 | ["\u0061\u30af\u30EA\u30b9"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_uescaped_newline.json: -------------------------------------------------------------------------------- 1 | ["new\u000Aline"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_unicodeEscapedBackslash.json: -------------------------------------------------------------------------------- 1 | ["\u005C"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_unicode_U+FDD0_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uFDD0"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_unicode_U+FFFE_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uFFFE"] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail26.json: -------------------------------------------------------------------------------- 1 | ["tab\ character\ in\ string\ "] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail3.json: -------------------------------------------------------------------------------- 1 | {unquoted_key: "keys must be quoted"} -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail32.json: -------------------------------------------------------------------------------- 1 | {"Comma instead if closing brace": true, -------------------------------------------------------------------------------- /test/corelib/input/persons.json: -------------------------------------------------------------------------------- 1 | { 2 | "persons" : ["John","David"] 3 | } 4 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_number_too_big_pos_int.json: -------------------------------------------------------------------------------- 1 | [100000000000000000000] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_1st_surrogate_but_2nd_missing.json: -------------------------------------------------------------------------------- 1 | ["\uDADA"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_unclosed_with_new_lines.json: -------------------------------------------------------------------------------- 1 | [1, 2 | 1 3 | ,1 -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_minus_sign_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | [-foo] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_with_alpha_char.json: -------------------------------------------------------------------------------- 1 | [1.8011670033376514H-308] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_repeated_null_null.json: -------------------------------------------------------------------------------- 1 | {null:null,null:null} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_trailing_comment_slash_open.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}// -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_two_commas_in_a_row.json: -------------------------------------------------------------------------------- 1 | {"a":"b",,"c":"d"} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_with_single_string.json: -------------------------------------------------------------------------------- 1 | { "foo" : "bar", "a" } -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_1_surrogate_then_escape_u.json: -------------------------------------------------------------------------------- 1 | ["\uD800\u"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_1_surrogate_then_escape_u1.json: -------------------------------------------------------------------------------- 1 | ["\uD800\u1"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_1_surrogate_then_escape_u1x.json: -------------------------------------------------------------------------------- 1 | ["\uD800\u1x"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_incomplete_escaped_character.json: -------------------------------------------------------------------------------- 1 | ["\u00A"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_leading_uescaped_thinspace.json: -------------------------------------------------------------------------------- 1 | [\u0020"asd"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_object_followed_by_closing_object.json: -------------------------------------------------------------------------------- 1 | {}} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_uescaped_LF_before_string.json: -------------------------------------------------------------------------------- 1 | [\u000A""] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_object_duplicated_key_and_value.json: -------------------------------------------------------------------------------- 1 | {"a":"b","a":"b"} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_object_escaped_null_in_key.json: -------------------------------------------------------------------------------- 1 | {"foo\u0000bar": 42} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_accepted_surrogate_pair.json: -------------------------------------------------------------------------------- 1 | ["\uD801\udc37"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_backslash_and_u_escaped_zero.json: -------------------------------------------------------------------------------- 1 | ["\\u0000"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_last_surrogates_1_and_2.json: -------------------------------------------------------------------------------- 1 | ["\uDBFF\uDFFF"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_reservedCharacterInUTF-8_U+1BFFF.json: -------------------------------------------------------------------------------- 1 | ["𛿿"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_unicode_U+10FFFE_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uDBFF\uDFFE"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_unicode_U+1FFFE_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uD83F\uDFFE"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json: -------------------------------------------------------------------------------- 1 | ["\u200B"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_unicode_U+2064_invisible_plus.json: -------------------------------------------------------------------------------- 1 | ["\u2064"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_unicode_escaped_double_quote.json: -------------------------------------------------------------------------------- 1 | ["\u0022"] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail13.json: -------------------------------------------------------------------------------- 1 | {"Numbers cannot have leading zeroes": 013} -------------------------------------------------------------------------------- /test/csv/input/desktop.ini: -------------------------------------------------------------------------------- 1 | [LocalizedFileNames] 2 | countries.csv=@countries.csv,0 3 | -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_csv-4925110364733440: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_ubjson-5667315455361024: -------------------------------------------------------------------------------- 1 | { -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_ubjson-5751108612653056: -------------------------------------------------------------------------------- 1 | N -------------------------------------------------------------------------------- /test/jsonschema/baseUriChange/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "integer" 3 | } 4 | -------------------------------------------------------------------------------- /test/bson/input/test6.bson: -------------------------------------------------------------------------------- 1 | @array[int]/012345 -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_inverted_surrogates_U+1D11E.json: -------------------------------------------------------------------------------- 1 | ["\uDd1e\uD834"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_comma_instead_of_closing_brace.json: -------------------------------------------------------------------------------- 1 | {"x": true, -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_object_with_comment.json: -------------------------------------------------------------------------------- 1 | {"a":/*comment*/"b"} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_object_with_trailing_garbage.json: -------------------------------------------------------------------------------- 1 | {"a": true} "x" -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_open_object_string_with_apostrophes.json: -------------------------------------------------------------------------------- 1 | {'a' -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_unclosed_array_partial_null.json: -------------------------------------------------------------------------------- 1 | [ false, nul -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_unclosed_array_unfinished_false.json: -------------------------------------------------------------------------------- 1 | [ true, fals -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_unclosed_array_unfinished_true.json: -------------------------------------------------------------------------------- 1 | [ false, tru -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail18.json: -------------------------------------------------------------------------------- 1 | [[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]] -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_csv-5762751990595584: -------------------------------------------------------------------------------- 1 | -6.6E6 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_json_cursor-5656793396150272: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_json_cursor-5686693027119104: -------------------------------------------------------------------------------- 1 | [ -------------------------------------------------------------------------------- /test/jsonschema/baseUriChangeFolder/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "integer" 3 | } 4 | -------------------------------------------------------------------------------- /acknowledgements.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/acknowledgements.md -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_number_too_big_neg_int.json: -------------------------------------------------------------------------------- 1 | [-123123123123123123123123123123] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_1st_valid_surrogate_2nd_invalid.json: -------------------------------------------------------------------------------- 1 | ["\uD888\u1234"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_incomplete_surrogate_and_escape_valid.json: -------------------------------------------------------------------------------- 1 | ["\uD800\n"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_non_string_key_but_huge_number_instead.json: -------------------------------------------------------------------------------- 1 | {9999E9999:1} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_trailing_comment_slash_open_incomplete.json: -------------------------------------------------------------------------------- 1 | {"a":"b"}/ -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_object_extreme_numbers.json: -------------------------------------------------------------------------------- 1 | { "min": -1.0e+28, "max": 1.0e+28 } -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_1_2_3_bytes_UTF-8_sequences.json: -------------------------------------------------------------------------------- 1 | ["\u0060\u012a\u12AB"] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/pass2.json: -------------------------------------------------------------------------------- 1 | [[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]] -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_csv_encoder-5202115606872064.fuzz: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_json_cursor-6585089218707456: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_parse-5981995560730624.fuzz: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/integer.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "integer" 3 | } 4 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: danielaparker 2 | custom: https://paypal.me/jsoncons?locale.x=en_US 3 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_incomplete_surrogates_escape_valid.json: -------------------------------------------------------------------------------- 1 | ["\uD800\uD800\n"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_incomplete_surrogate_escape_invalid.json: -------------------------------------------------------------------------------- 1 | ["\uD800\uD800\x"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_accepted_surrogate_pairs.json: -------------------------------------------------------------------------------- 1 | ["\ud83d\ude39\ud83d\udc8d"] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json: -------------------------------------------------------------------------------- 1 | ["\uD834\uDd1e"] -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail1.json: -------------------------------------------------------------------------------- 1 | "A JSON payload should be an object or array, not a string." -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/fail10.json: -------------------------------------------------------------------------------- 1 | {"Extra value after close": true} "misplaced quoted value" -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/nested/string.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "string" 3 | } 4 | -------------------------------------------------------------------------------- /test/jsonschema/baseUriChangeFolderInSubschema/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "integer" 3 | } 4 | -------------------------------------------------------------------------------- /.github/btn_support.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/.github/btn_support.PNG -------------------------------------------------------------------------------- /doc/ref/bson/decode_bson.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/bson/decode_bson.md -------------------------------------------------------------------------------- /doc/ref/bson/encode_bson.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/bson/encode_bson.md -------------------------------------------------------------------------------- /doc/ref/corelib/json/as.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/corelib/json/as.md -------------------------------------------------------------------------------- /examples/input/multiple-json-objects.json: -------------------------------------------------------------------------------- 1 | {"a":1,"b":2,"c":3} 2 | {"a":4,"b":5,"c":6} 3 | {"a":7,"b":8,"c":9} 4 | -------------------------------------------------------------------------------- /test/bson/input/test12.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test12.bson -------------------------------------------------------------------------------- /test/bson/input/test15.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test15.bson -------------------------------------------------------------------------------- /test/bson/input/test17.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test17.bson -------------------------------------------------------------------------------- /test/bson/input/test20.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test20.bson -------------------------------------------------------------------------------- /test/bson/input/test22.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test22.bson -------------------------------------------------------------------------------- /test/bson/input/test24.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test24.bson -------------------------------------------------------------------------------- /test/bson/input/test26.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test26.bson -------------------------------------------------------------------------------- /test/bson/input/test28.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test28.bson -------------------------------------------------------------------------------- /test/bson/input/test3.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test3.bson -------------------------------------------------------------------------------- /test/bson/input/test33.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test33.bson -------------------------------------------------------------------------------- /test/bson/input/test34.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test34.bson -------------------------------------------------------------------------------- /test/bson/input/test35.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test35.bson -------------------------------------------------------------------------------- /test/bson/input/test36.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test36.bson -------------------------------------------------------------------------------- /test/bson/input/test38.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test38.bson -------------------------------------------------------------------------------- /test/bson/input/test39.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test39.bson -------------------------------------------------------------------------------- /test/bson/input/test4.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test4.bson -------------------------------------------------------------------------------- /test/bson/input/test41.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test41.bson -------------------------------------------------------------------------------- /test/bson/input/test43.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test43.bson -------------------------------------------------------------------------------- /test/bson/input/test44.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test44.bson -------------------------------------------------------------------------------- /test/bson/input/test45.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test45.bson -------------------------------------------------------------------------------- /test/bson/input/test47.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test47.bson -------------------------------------------------------------------------------- /test/bson/input/test49.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test49.bson -------------------------------------------------------------------------------- /test/bson/input/test51.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test51.bson -------------------------------------------------------------------------------- /test/bson/input/test52.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test52.bson -------------------------------------------------------------------------------- /test/bson/input/test53.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test53.bson -------------------------------------------------------------------------------- /test/bson/input/test54.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test54.bson -------------------------------------------------------------------------------- /test/bson/input/test55.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test55.bson -------------------------------------------------------------------------------- /test/bson/input/test56.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test56.bson -------------------------------------------------------------------------------- /test/bson/input/test7.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/bson/input/test7.bson -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_csv_encoder-5699775833047040: -------------------------------------------------------------------------------- 1 | -9223372036854775808 -------------------------------------------------------------------------------- /test/corelib/output/store.cbor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/output/store.cbor -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/baseUriChange/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "integer" 3 | } 4 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_number_very_big_negative_int.json: -------------------------------------------------------------------------------- 1 | [-237462374673276894279832749832423479823246327846] -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_csv_encoder-5682837304115200.fuzz: -------------------------------------------------------------------------------- 1 | -E-1841678677841678677440 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_json_encoder-5639543840702464: -------------------------------------------------------------------------------- 1 | {":":[true -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/baseUriChangeFolder/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "integer" 3 | } 4 | -------------------------------------------------------------------------------- /doc/ref/corelib/json/operator_at.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/corelib/json/operator_at.md -------------------------------------------------------------------------------- /doc/ref/corelib/basic_json_options.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/corelib/basic_json_options.md -------------------------------------------------------------------------------- /doc/ref/bson/diagrams/bson_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/bson/diagrams/bson_options.png -------------------------------------------------------------------------------- /doc/ref/cbor/diagrams/cbor_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/cbor/diagrams/cbor_options.png -------------------------------------------------------------------------------- /doc/ref/corelib/diagrams/conv_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/corelib/diagrams/conv_error.png -------------------------------------------------------------------------------- /doc/ref/corelib/diagrams/ser_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/corelib/diagrams/ser_error.png -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/baseUriChangeFolderInSubschema/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "integer" 3 | } 4 | -------------------------------------------------------------------------------- /doc/ref/corelib/diagrams/json_decoder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/corelib/diagrams/json_decoder.png -------------------------------------------------------------------------------- /doc/ref/csv/diagrams/basic_csv_encoder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/csv/diagrams/basic_csv_encoder.png -------------------------------------------------------------------------------- /doc/ref/csv/diagrams/basic_csv_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/csv/diagrams/basic_csv_options.png -------------------------------------------------------------------------------- /doc/ref/ubjson/diagrams/ubjson_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/ubjson/diagrams/ubjson_options.png -------------------------------------------------------------------------------- /doc/ref/bson/diagrams/basic_bson_encoder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/bson/diagrams/basic_bson_encoder.png -------------------------------------------------------------------------------- /doc/ref/cbor/diagrams/basic_cbor_encoder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/cbor/diagrams/basic_cbor_encoder.png -------------------------------------------------------------------------------- /doc/ref/jmespath/diagrams/jmespath_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/jmespath/diagrams/jmespath_error.png -------------------------------------------------------------------------------- /doc/ref/jsonpath/diagrams/jsonpath_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/jsonpath/diagrams/jsonpath_error.png -------------------------------------------------------------------------------- /doc/ref/jsonschema/diagrams/schema_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/jsonschema/diagrams/schema_error.png -------------------------------------------------------------------------------- /doc/ref/msgpack/diagrams/msgpack_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/msgpack/diagrams/msgpack_options.png -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/Acknowledgement.txt: -------------------------------------------------------------------------------- 1 | These files are from the JSON_checker test suite 2 | 3 | http://www.json.org/JSON_checker/ 4 | -------------------------------------------------------------------------------- /doc/ref/corelib/diagrams/basic_json_encoder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/corelib/diagrams/basic_json_encoder.png -------------------------------------------------------------------------------- /doc/ref/corelib/diagrams/basic_json_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/corelib/diagrams/basic_json_filter.png -------------------------------------------------------------------------------- /doc/ref/corelib/diagrams/basic_json_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/corelib/diagrams/basic_json_options.png -------------------------------------------------------------------------------- /doc/ref/jsonpatch/diagrams/jsonpatch_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/jsonpatch/diagrams/jsonpatch_error.png -------------------------------------------------------------------------------- /doc/ref/jsonpointer/diagrams/jsonpointer_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/jsonpointer/diagrams/jsonpointer_error.png -------------------------------------------------------------------------------- /doc/ref/jsonschema/diagrams/validation_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/jsonschema/diagrams/validation_error.png -------------------------------------------------------------------------------- /doc/ref/msgpack/diagrams/basic_msgpack_encoder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/msgpack/diagrams/basic_msgpack_encoder.png -------------------------------------------------------------------------------- /doc/ref/ubjson/diagrams/basic_ubjson_encoder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/ubjson/diagrams/basic_ubjson_encoder.png -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_number_double_close_to_zero.json: -------------------------------------------------------------------------------- 1 | [-0.000000000000000000000000000000000000000000000000000000000000000000000000000001] 2 | -------------------------------------------------------------------------------- /test/csv/input/countries.csv: -------------------------------------------------------------------------------- 1 | country_code,name 2 | ABW,ARUBA 3 | ATF,"FRENCH SOUTHERN TERRITORIES, D.R. OF" 4 | VUT,VANUATU 5 | WLF,WALLIS & FUTUNA ISLANDS 6 | -------------------------------------------------------------------------------- /doc/ref/corelib/diagrams/basic_default_json_visitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/corelib/diagrams/basic_default_json_visitor.png -------------------------------------------------------------------------------- /doc/ref/corelib/diagrams/rename_object_key_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/doc/ref/corelib/diagrams/rename_object_key_filter.png -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_object_long_strings.json: -------------------------------------------------------------------------------- 1 | {"x":[{"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}], "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"} -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/y_object_string_unicode.json: -------------------------------------------------------------------------------- 1 | {"title":"\u041f\u043e\u043b\u0442\u043e\u0440\u0430 \u0417\u0435\u043c\u043b\u0435\u043a\u043e\u043f\u0430" } -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/integer.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "type": "integer" 4 | } 5 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_invalid_utf-8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_invalid_utf-8.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_iso_latin_1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_iso_latin_1.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_a_invalid_utf8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/n_array_a_invalid_utf8.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_array_invalid_utf8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/n_array_invalid_utf8.json -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/nested/string.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "type": "string" 4 | } 5 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/integer.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2019-09/schema", 3 | "type": "integer" 4 | } 5 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/integer.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "type": "integer" 4 | } 5 | -------------------------------------------------------------------------------- /doc/ref/jsonschema/walk_result.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::jsonschema::walk_result 2 | 3 | ```cpp 4 | enum class walk_result { 5 | advance, 6 | abort 7 | }; 8 | ``` 9 | 10 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_truncated-utf-8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_truncated-utf-8.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_utf16BE_no_BOM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_utf16BE_no_BOM.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_utf16LE_no_BOM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_utf16LE_no_BOM.json -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/nested/string.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2019-09/schema", 3 | "type": "string" 4 | } 5 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/nested/string.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "type": "string" 4 | } 5 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_UTF-16LE_with_BOM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_UTF-16LE_with_BOM.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_single_eacute.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/n_structure_single_eacute.json -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/nested/foo-ref-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "foo": {"$ref": "string.json"} 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_number_huge_exp.json: -------------------------------------------------------------------------------- 1 | [0.4e00669999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999969999999006] -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_not_in_unicode_range.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_not_in_unicode_range.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_invalid-utf-8-in-int.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/n_number_invalid-utf-8-in-int.json -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/baseUriChange/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "type": "integer" 4 | } 5 | -------------------------------------------------------------------------------- /doc/build.md: -------------------------------------------------------------------------------- 1 | Start Visual Studio Command prompt for x64 2 | 3 | mkdir build64 & pushd build64 4 | cmake -G "Visual Studio 14 2015 Win64" .. 5 | popd 6 | cmake --build build64 --config Debug 7 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_UTF-8_invalid_sequence.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_UTF-8_invalid_sequence.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_UTF8_surrogate_U+D800.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_UTF8_surrogate_U+D800.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_invalid-utf-8-in-escape.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/n_string_invalid-utf-8-in-escape.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_incomplete_UTF8_BOM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/n_structure_incomplete_UTF8_BOM.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_structure_lone-invalid-utf-8.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/n_structure_lone-invalid-utf-8.json -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/baseUriChangeFolder/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "type": "integer" 4 | } 5 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/baseUriChange/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2019-09/schema", 3 | "type": "integer" 4 | } 5 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/baseUriChange/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "type": "integer" 4 | } 5 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_overlong_sequence_2_bytes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_overlong_sequence_2_bytes.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_overlong_sequence_6_bytes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_overlong_sequence_6_bytes.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_invalid-utf-8-in-exponent.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/n_number_invalid-utf-8-in-exponent.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_string_invalid_utf8_after_escape.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/n_string_invalid_utf8_after_escape.json -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/baseUriChangeFolder/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2019-09/schema", 3 | "type": "integer" 4 | } 5 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/baseUriChangeFolder/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "type": "integer" 4 | } 5 | -------------------------------------------------------------------------------- /doc/ref/corelib/line_split_kind.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::line_split_kind 2 | 3 | ```cpp 4 | #include 5 | 6 | enum class line_split_kind{same_line,new_line,multi_line}; 7 | ``` 8 | 9 | -------------------------------------------------------------------------------- /examples/build/cmake/run_examples_vc140x64.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set DIR=%~dp0 4 | 5 | cd %DIR%..\.. 6 | 7 | call "build/cmake/build_vc140x64/Debug/jsoncons_examples.exe" 8 | 9 | cd %DIR% 10 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_lone_utf8_continuation_byte.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_lone_utf8_continuation_byte.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_invalid-utf-8-in-bigger-int.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/n_number_invalid-utf-8-in-bigger-int.json -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-fuzz_bson-5637264110780416: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-fuzz_bson-5637264110780416 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-fuzz_cbor-5141282369568768: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-fuzz_cbor-5141282369568768 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-fuzz_cbor-5687592176844800: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-fuzz_cbor-5687592176844800 -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/i_string_overlong_sequence_6_bytes_null.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/i_string_overlong_sequence_6_bytes_null.json -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_number_real_with_invalid_utf8_after_e.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/n_number_real_with_invalid_utf8_after_e.json -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-fuzz_msgpack-5727715157344256: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-fuzz_msgpack-5727715157344256 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-fuzz_ubjson-5681659887484928: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-fuzz_ubjson-5681659887484928 -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/baseUriChangeFolderInSubschema/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "type": "integer" 4 | } 5 | -------------------------------------------------------------------------------- /test/corelib/input/JSON_checker/pass3.json: -------------------------------------------------------------------------------- 1 | { 2 | "JSON Test Pattern pass3": { 3 | "The outermost value": "must be an object or array.", 4 | "In this test": "It is an object." 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/baseUriChangeFolderInSubschema/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2019-09/schema", 3 | "type": "integer" 4 | } 5 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/baseUriChangeFolderInSubschema/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "type": "integer" 4 | } 5 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/urn-ref-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "urn:uuid:feebdaed-ffff-0000-ffff-0000deadbeef", 3 | "$defs": {"bar": {"type": "string"}}, 4 | "$ref": "#/$defs/bar" 5 | } 6 | -------------------------------------------------------------------------------- /test/jsonschema/more_tests/draft2020-12/README: -------------------------------------------------------------------------------- 1 | unevaluated-tests.json is from https://github.com/networknt/json-schema-validator/tree/master/src/test/resources/schema/unevaluatedTests 2 | 3 | Apache-2.0 license 4 | -------------------------------------------------------------------------------- /examples/output/tasks.csv: -------------------------------------------------------------------------------- 1 | (1) 2 | project_id,task_name,task_start,task_finish 3 | 4001,task2,02/01/2003,02/28/2003 4 | 4001,task3,03/01/2003,03/31/2003 5 | 4002,task1,04/01/2003,04/30/2003 6 | 4002,task2,05/01/2003, 7 | -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-fuzz_cbor_encoder-5665976638242816: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-fuzz_cbor_encoder-5665976638242816 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-fuzz_cbor_encoder-5673305546948608: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-fuzz_cbor_encoder-5673305546948608 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-fuzz_cbor_encoder-5681910597812224: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-fuzz_cbor_encoder-5681910597812224 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-fuzz_cbor_encoder-5685492533428224: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-fuzz_cbor_encoder-5685492533428224 -------------------------------------------------------------------------------- /examples/input/countries.json: -------------------------------------------------------------------------------- 1 | [ 2 | ["country_code","name"], 3 | ["ABW","ARUBA"], 4 | ["ATF","FRENCH SOUTHERN TERRITORIES, D.R. OF"], 5 | ["VUT","VANUATU"], 6 | ["WLF","WALLIS & FUTUNA ISLANDS"] 7 | ] 8 | -------------------------------------------------------------------------------- /test/csv/input/countries.json: -------------------------------------------------------------------------------- 1 | [ 2 | ["country_code","name"], 3 | ["ABW","ARUBA"], 4 | ["ATF","FRENCH SOUTHERN TERRITORIES, D.R. OF"], 5 | ["VUT","VANUATU"], 6 | ["WLF","WALLIS & FUTUNA ISLANDS"] 7 | ] 8 | -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-fuzz_msgpack_encoder-5677646685143040: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-fuzz_msgpack_encoder-5677646685143040 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_cbor-5171679883165696: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_cbor-5171679883165696 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_cbor-5639265590706176: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_cbor-5639265590706176 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_cbor-5743359164678144: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_cbor-5743359164678144 -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/different-id-ref-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/real-id-ref-string.json", 3 | "$defs": {"bar": {"type": "string"}}, 4 | "$ref": "#/$defs/bar" 5 | } 6 | -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_msgpack-5651190114418688: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_msgpack-5651190114418688 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_ubjson-5737197673381888: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_ubjson-5737197673381888 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_ubjson-5738905124208640: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_ubjson-5738905124208640 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_cbor-5740910806827008.fuzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_cbor-5740910806827008.fuzz -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_bson_encoder-5420549982519296: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_bson_encoder-5420549982519296 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_cbor_encoder-4729089884225536: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_cbor_encoder-4729089884225536 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_cbor_encoder-6266427819687936: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_cbor_encoder-6266427819687936 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_csv_encoder-4850580052312064: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_csv_encoder-4850580052312064 -------------------------------------------------------------------------------- /doc/ref/corelib/json/destructor.md: -------------------------------------------------------------------------------- 1 | ### `jsoncons::basic_json::basic_json` 2 | 3 | ```cpp 4 | ~basic_json() noexcept; 5 | ``` 6 | 7 | Destroys all values and deletes all memory allocated for strings, arrays, and objects. 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/corelib/input/JSONTestSuite/n_object_lone_continuation_byte_in_key_and_trailing_comma.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/corelib/input/JSONTestSuite/n_object_lone_continuation_byte_in_key_and_trailing_comma.json -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_msgpack_encoder-5091553277706240: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_msgpack_encoder-5091553277706240 -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_ubjson_encoder-5711604342849536: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_ubjson_encoder-5711604342849536 -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Maintain dependencies for GitHub Actions 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | open-pull-requests-limit: 10 7 | schedule: 8 | interval: "weekly" 9 | -------------------------------------------------------------------------------- /examples/build/cmake/build_vc140x64.cmd: -------------------------------------------------------------------------------- 1 | call rmdir build_vc140x64 /S/Q 2 | call mkdir build_vc140x64 & pushd build_vc140x64 3 | call cmake -G "Visual Studio 14 2015 Win64" .. 4 | call popd 5 | call cmake --build build_vc140x64 --config Debug 6 | 7 | -------------------------------------------------------------------------------- /examples/input/tasks.csv: -------------------------------------------------------------------------------- 1 | project_id, task_name, task_start, task_finish 2 | 4001,task1,01/01/2003,01/31/2003 3 | 4001,task2,02/01/2003,02/28/2003 4 | 4001,task3,03/01/2003,03/31/2003 5 | 4002,task1,04/01/2003,04/30/2003 6 | 4002,task2,05/01/2003, 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Discuss 4 | url: https://github.com/danielaparker/jsoncons/discussions 5 | about: Ask questions and initiate discussions with other community members 6 | -------------------------------------------------------------------------------- /doc/ref/corelib/spaces_option.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::spaces_option 2 | 3 | ```cpp 4 | enum class spaces_option : uint8_t 5 | { 6 | no_spaces=0, 7 | space_after, 8 | space_before, 9 | space_before_and_after 10 | }; 11 | ``` 12 | 13 | -------------------------------------------------------------------------------- /test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_msgpack_parser_max-6248108141576192: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielaparker/jsoncons/HEAD/test/fuzz_regression/input/clusterfuzz-testcase-minimized-fuzz_msgpack_parser_max-6248108141576192 -------------------------------------------------------------------------------- /test/jsonschema/issues/draft2019-09/issue-ref.txt: -------------------------------------------------------------------------------- 1 | File: ./jsonschema/JSON-Schema-Test-Suite/tests/draft2019-09/ref.json 16 2 | Could not open ./jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/schema-relative-uri-defs2.json for schema loading 3 | -------------------------------------------------------------------------------- /doc/ref/jsonpath/functions/abs.md: -------------------------------------------------------------------------------- 1 | ### abs 2 | 3 | ``` 4 | number abs(number value) 5 | ``` 6 | 7 | Returns the absolute value of a number. 8 | 9 | It is a type error if the provided argument is not a number. 10 | 11 | ### Examples 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/nested/foo-ref-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "type": "object", 4 | "properties": { 5 | "foo": {"$ref": "string.json"} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | If you find a security vulnerability in this repository, please report it using the [GitHub Security Advisory](https://github.com/danielaparker/jsoncons/security/advisories/new) form. 6 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/nested/foo-ref-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2019-09/schema", 3 | "type": "object", 4 | "properties": { 5 | "foo": {"$ref": "string.json"} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/nested/foo-ref-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "type": "object", 4 | "properties": { 5 | "foo": {"$ref": "string.json"} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /doc/ref/jsonpath/functions/keys.md: -------------------------------------------------------------------------------- 1 | ### keys 2 | 3 | ``` 4 | array[string] keys(object value) 5 | ``` 6 | 7 | Returns an array of keys in the object. 8 | 9 | It is a type error if the provided argument is not an object. 10 | 11 | ### Examples 12 | 13 | 14 | -------------------------------------------------------------------------------- /doc/ref/corelib/indenting.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::indenting 2 | 3 | ```cpp 4 | #include 5 | 6 | enum class indenting {no_indent, indent} 7 | ``` 8 | 9 | Specifies indentation options for the [basic_json_encoder](basic_json_encoder.md) 10 | 11 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft7/ignore-dependentRequired.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft7/integer.json", 3 | "$schema": "http://json-schema.org/draft-07/schema#", 4 | "dependentRequired": { 5 | "foo": ["bar"] 6 | } 7 | } -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/subSchemas.json: -------------------------------------------------------------------------------- 1 | { 2 | "definitions": { 3 | "integer": { 4 | "type": "integer" 5 | }, 6 | "refToInteger": { 7 | "$ref": "#/definitions/integer" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/prefixItems.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft2020-12/prefixItems.json", 3 | "$schema": "https://json-schema.org/draft/2020-12/schema", 4 | "prefixItems": [ 5 | {"type": "string"} 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /doc/ref/corelib/float_chars_format.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::float_chars_format 2 | 3 | ```cpp 4 | #include 5 | 6 | enum class float_chars_format : uint8_t {general,fixed,scientific,hex}; 7 | ``` 8 | 9 | A type used to specify floating-point formatting. 10 | 11 | -------------------------------------------------------------------------------- /test/csv/input/employees.txt: -------------------------------------------------------------------------------- 1 | employee-no employee-name dept salary note 2 | 00000001 Smith, Matthew sales 150,000.00 3 | 00000002 Brown, Sarah sales 89,000.00 4 | 00000003 Oberc, Scott finance 110,000.00 5 | 00000004 Scott, Colette sales 75,000.00 """Exemplary"" employee 6 | Dependable, trustworthy" 7 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/dependentRequired.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft2019-09/dependentRequired.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "dependentRequired": { 5 | "foo": ["bar"] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/ignore-prefixItems.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft2019-09/ignore-prefixItems.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "prefixItems": [ 5 | {"type": "string"} 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/locationIndependentIdentifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "refToInteger": { 4 | "$ref": "#foo" 5 | }, 6 | "A": { 7 | "$anchor": "foo", 8 | "type": "integer" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /doc/ref/jsonpath/path_node_kind.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::jsonpath::path_node_kind 2 | 3 | ```cpp 4 | enum class result_options { 5 | root, 6 | name, 7 | index 8 | }; (since 0.172.0) 9 | ``` 10 | 11 | Indicates the kind of path node 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/input/sales.csv: -------------------------------------------------------------------------------- 1 | customer_name,has_coupon,phone_number,zip_code,sales_tax_rate,total_amount 2 | "John Roe",true,0272561313,01001,0.05,431.65 3 | "Jane Doe",false,416-272-2561,55416,0.15,480.70 4 | "Joe Bloggs",false,"4162722561","55416",0.15,300.70 5 | "John Smith",FALSE,NULL,22313-1450,0.15,300.70 6 | 7 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/locationIndependentIdentifierDraft4.json: -------------------------------------------------------------------------------- 1 | { 2 | "definitions": { 3 | "refToInteger": { 4 | "$ref": "#foo" 5 | }, 6 | "A": { 7 | "id": "#foo", 8 | "type": "integer" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/locationIndependentIdentifierPre2019.json: -------------------------------------------------------------------------------- 1 | { 2 | "definitions": { 3 | "refToInteger": { 4 | "$ref": "#foo" 5 | }, 6 | "A": { 7 | "$id": "#foo", 8 | "type": "integer" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/nested-absolute-ref-to-string.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "bar": { 4 | "$id": "http://localhost:1234/the-nested-id.json", 5 | "type": "string" 6 | } 7 | }, 8 | "$ref": "http://localhost:1234/the-nested-id.json" 9 | } 10 | -------------------------------------------------------------------------------- /test/corelib/input/address-book.json: -------------------------------------------------------------------------------- 1 | { 2 | "address-book" : 3 | [ 4 | { 5 | "name":"Jane Roe", 6 | "email":"jane.roe@example.com" 7 | }, 8 | { 9 | "name":"John", 10 | "email" : "john.doe@example.com" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /test/jmespath/input/compliance/test.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "given": {"reservations": [ 4 | {"instances": [{"foo": 1}, {"foo": 2}]} 5 | ]}, 6 | "cases": [ 7 | { 8 | "expression": "reservations[].instances[].foo", 9 | "result": [1, 2] 10 | } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/ref-and-defs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/ref-and-defs.json", 3 | "$defs": { 4 | "inner": { 5 | "properties": { 6 | "bar": { "type": "string" } 7 | } 8 | } 9 | }, 10 | "$ref": "#/$defs/inner" 11 | } 12 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/subSchemas.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "$defs": { 4 | "integer": { 5 | "type": "integer" 6 | }, 7 | "refToInteger": { 8 | "$ref": "#/$defs/integer" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/corelib/src/utility/from_integer_tests.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2025 Daniel Parker 2 | // Distributed under Boost license 3 | 4 | #include 5 | #include 6 | 7 | using namespace jsoncons; 8 | 9 | TEST_CASE("utility::from_integer tests") 10 | { 11 | SECTION("") 12 | { 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/subSchemas.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2019-09/schema", 3 | "$defs": { 4 | "integer": { 5 | "type": "integer" 6 | }, 7 | "refToInteger": { 8 | "$ref": "#/$defs/integer" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/subSchemas.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$defs": { 4 | "integer": { 5 | "type": "integer" 6 | }, 7 | "refToInteger": { 8 | "$ref": "#/$defs/integer" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/output/new-address-book1.json: -------------------------------------------------------------------------------- 1 | { 2 | "address-book": [ 3 | { 4 | "first-name": "Jane", 5 | "last-name": "Roe", 6 | "email": "jane.roe@example.com" 7 | }, 8 | { 9 | "first-name": "John", 10 | "email": "john.doe@example.com" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /examples/output/new-address-book2.json: -------------------------------------------------------------------------------- 1 | { 2 | "address-book": [ 3 | { 4 | "email": "jane.roe@example.com", 5 | "first-name": "Jane", 6 | "last-name": "Roe" 7 | }, 8 | { 9 | "email": "john.doe@example.com", 10 | "first-name": "John" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /doc/ref/corelib/half_arg.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::half_arg 2 | 3 | ```cpp 4 | #include 5 | 6 | constexpr half_arg_t half_arg{}; (inline if at least C++17) 7 | ``` 8 | 9 | A constant of type [half_arg_t](half_arg_t.md) used as first argument to disambiguate constructor overloads for half precision floating point numbers. 10 | 11 | -------------------------------------------------------------------------------- /test/corelib/output/address-book-new.json: -------------------------------------------------------------------------------- 1 | { 2 | "address-book": [ 3 | { 4 | "first-name": "Jane", 5 | "last-name": "Roe", 6 | "email2": "jane.roe@example.com" 7 | }, 8 | { 9 | "first-name": "John", 10 | "email2": "john.doe@example.com" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /examples/output/export_settings.json: -------------------------------------------------------------------------------- 1 | {"File Format Options":{"Color Spaces":["sRGB","AdobeRGB","ProPhoto RGB"],"Image Formats":["JPEG","PSD","TIFF","DNG"]},"File Settings":{"Color Space":"sRGB","Image Format":"JPEG","Limit File Size":true,"Limit File Size To":10000},"Image Sizing":{"Dimension 1":9.84,"Resize To Fit":true,"Resize Unit":"pixels","Resize What":"long_edge"}} -------------------------------------------------------------------------------- /doc/ref/corelib/json_array_arg.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::json_array_arg 2 | 3 | ```cpp 4 | #include 5 | 6 | constexpr json_array_arg_t json_array_arg{}; (inline if at least C++17) 7 | ``` 8 | 9 | A constant of type [json_array_arg_t](json_array_arg_t.md) used as first argument to disambiguate constructor overloads for json arrays. 10 | 11 | -------------------------------------------------------------------------------- /examples/input/address-book.json: -------------------------------------------------------------------------------- 1 | { 2 | "address-book" : 3 | [ 4 | { 5 | "name":"Jane Roe", 6 | "email":"jane.roe@example.com" 7 | }, 8 | { 9 | "name":"John", 10 | "email" : "john.doe@example.com" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /doc/ref/corelib/byte_string_arg.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::byte_string_arg 2 | 3 | ```cpp 4 | #include 5 | 6 | constexpr byte_string_arg_t byte_string_arg{}; (inline if at least C++17) 7 | ``` 8 | 9 | A constant of type [byte_string_arg_t](byte_string_arg_t.md) used as first argument to disambiguate constructor overloads for byte strings. 10 | 11 | -------------------------------------------------------------------------------- /doc/ref/corelib/json_object_arg.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::json_object_arg 2 | 3 | ```cpp 4 | #include 5 | 6 | constexpr json_object_arg_t json_object_arg{}; (inline if at least C++17) 7 | ``` 8 | 9 | A constant of type [json_object_arg_t](json_object_arg_t.md) used as first argument to disambiguate constructor overloads for json objects. 10 | 11 | -------------------------------------------------------------------------------- /doc/ref/corelib/half_arg_t.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::half_arg_t 2 | 3 | ```cpp 4 | #include 5 | 6 | struct half_arg_t {explicit half_arg_t() = default;}; 7 | ``` 8 | 9 | `half_arg_t` is an empty class type used to disambiguate constructor overloads for half precision floating point numbers. 10 | 11 | ### See also 12 | 13 | [half_arg](half_arg.md) 14 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/locationIndependentIdentifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "$defs": { 4 | "refToInteger": { 5 | "$ref": "#foo" 6 | }, 7 | "A": { 8 | "$anchor": "foo", 9 | "type": "integer" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/ref-and-definitions.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/ref-and-definitions.json", 3 | "definitions": { 4 | "inner": { 5 | "properties": { 6 | "bar": { "type": "string" } 7 | } 8 | } 9 | }, 10 | "allOf": [ { "$ref": "#/definitions/inner" } ] 11 | } 12 | -------------------------------------------------------------------------------- /doc/ref/jsonpath/functions/prod.md: -------------------------------------------------------------------------------- 1 | ### prod 2 | 3 | ```cpp 4 | number|null avg(array[number] value) 5 | ``` 6 | 7 | Returns the product of the items in an array of numbers, or null if the array is empty. 8 | 9 | It is a type error if 10 | 11 | - the provided value is not an array 12 | 13 | - the array contains items that are not numbers 14 | 15 | ### Examples 16 | 17 | 18 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/locationIndependentIdentifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2019-09/schema", 3 | "$defs": { 4 | "refToInteger": { 5 | "$ref": "#foo" 6 | }, 7 | "A": { 8 | "$anchor": "foo", 9 | "type": "integer" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/locationIndependentIdentifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$defs": { 4 | "refToInteger": { 5 | "$ref": "#foo" 6 | }, 7 | "A": { 8 | "$anchor": "foo", 9 | "type": "integer" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft6/detached-ref.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft6/detached-ref.json", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "definitions": { 5 | "foo": { 6 | "$ref": "#detached" 7 | }, 8 | "detached": { 9 | "$id": "#detached", 10 | "type": "integer" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft7/detached-ref.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft7/detached-ref.json", 3 | "$schema": "http://json-schema.org/draft-07/schema#", 4 | "definitions": { 5 | "foo": { 6 | "$ref": "#detached" 7 | }, 8 | "detached": { 9 | "$id": "#detached", 10 | "type": "integer" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/name-defs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$defs": { 3 | "orNull": { 4 | "anyOf": [ 5 | { 6 | "type": "null" 7 | }, 8 | { 9 | "$ref": "#" 10 | } 11 | ] 12 | } 13 | }, 14 | "type": "string" 15 | } 16 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/name.json: -------------------------------------------------------------------------------- 1 | { 2 | "definitions": { 3 | "orNull": { 4 | "anyOf": [ 5 | { 6 | "type": "null" 7 | }, 8 | { 9 | "$ref": "#" 10 | } 11 | ] 12 | } 13 | }, 14 | "type": "string" 15 | } 16 | -------------------------------------------------------------------------------- /doc/ref/jsonpath/functions/ends_with.md: -------------------------------------------------------------------------------- 1 | ### ends_with 2 | 3 | ``` 4 | boolean ends_with(string source, string suffix) 5 | ``` 6 | 7 | Returns true if the source string ends with the suffix string, otherwise false. 8 | 9 | It is a type error if 10 | 11 | - the provided source is not a string, or 12 | 13 | - the provided suffix is not a string 14 | 15 | ### Examples 16 | 17 | 18 | -------------------------------------------------------------------------------- /doc/ref/jsonpath/functions/starts_with.md: -------------------------------------------------------------------------------- 1 | ### starts_with 2 | 3 | ``` 4 | boolean starts_with(string source, string prefix) 5 | ``` 6 | 7 | Returns true if the source string starts with the prefix string, otherwise false. 8 | 9 | It is a type error if 10 | 11 | - the provided source is not a string, or 12 | - the provided prefix is not a string 13 | 14 | ### Examples 15 | 16 | 17 | -------------------------------------------------------------------------------- /doc/ref/jsonpath/functions/to_number.md: -------------------------------------------------------------------------------- 1 | ### to_number 2 | 3 | ``` 4 | number to_number(string|number value) 5 | ``` 6 | 7 | If string, returns the parsed number. 8 | If number, returns the passed in value. 9 | 10 | It is a type error if 11 | 12 | - the provided value is not a string or number 13 | 14 | - the string cannot be parsed as a number 15 | 16 | ### Examples 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/detached-ref.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft-next/detached-ref.json", 3 | "$schema": "https://json-schema.org/draft/next/schema", 4 | "$defs": { 5 | "foo": { 6 | "$ref": "#detached" 7 | }, 8 | "detached": { 9 | "$anchor": "detached", 10 | "type": "integer" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /doc/ref/corelib/json_array_arg_t.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::json_array_arg_t 2 | 3 | #include 5 | 6 | struct byte_string_arg_t {explicit byte_string_arg_t() = default;}; 7 | ``` 8 | 9 | `byte_string_arg_t` is an empty class type used to disambiguate constructor overloads for byte strings. 10 | 11 | ### See also 12 | 13 | [byte_string_arg](byte_string_arg.md) 14 | -------------------------------------------------------------------------------- /doc/ref/corelib/json_object_arg_t.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::json_object_arg_t 2 | 3 | ```cpp 4 | #include 5 | 6 | struct json_object_arg_t {explicit json_object_arg_t() = default;}; 7 | ``` 8 | 9 | `json_object_arg_t` is an empty class type used to disambiguate constructor overloads for json objects. 10 | 11 | ### See also 12 | 13 | [json_object_arg](json_object_arg.md) 14 | -------------------------------------------------------------------------------- /test/jsonpath/input/test.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "given" : [[1, 2, 3], [1], [2, 3], 1, 2], 4 | "cases" : [ 5 | { 6 | "comment" : "Filter expression with equals array for array slice with range 1", 7 | "expression" : "$[?(@[0:1]==[1])]", 8 | "result" : [[1,2,3],[1]] 9 | } 10 | ] 11 | } 12 | ] 13 | 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Propose a new feature for this library 4 | title: '' 5 | labels: Feature request 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the proposed feature** 11 | 12 | **What other libraries (C++ or other) have this feature?** 13 | 14 | **Include a code fragment with sample data that illustrates the use of this feature** 15 | -------------------------------------------------------------------------------- /fuzzers/fuzz_parse.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace jsoncons; 5 | 6 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 7 | { 8 | std::string input(reinterpret_cast(data), size); 9 | try{ 10 | json val = json::parse(input); 11 | } 12 | catch(const jsoncons::ser_error&) {} 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/detached-dynamicref.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft-next/detached-dynamicref.json", 3 | "$schema": "https://json-schema.org/draft/next/schema", 4 | "$defs": { 5 | "foo": { 6 | "$dynamicRef": "#detached" 7 | }, 8 | "detached": { 9 | "$dynamicAnchor": "detached", 10 | "type": "integer" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/ref-and-defs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "$id": "http://localhost:1234/draft-next/ref-and-defs.json", 4 | "$defs": { 5 | "inner": { 6 | "properties": { 7 | "bar": { "type": "string" } 8 | } 9 | } 10 | }, 11 | "$ref": "#/$defs/inner" 12 | } 13 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/ref-and-defs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2019-09/schema", 3 | "$id": "http://localhost:1234/draft2019-09/ref-and-defs.json", 4 | "$defs": { 5 | "inner": { 6 | "properties": { 7 | "bar": { "type": "string" } 8 | } 9 | } 10 | }, 11 | "$ref": "#/$defs/inner" 12 | } 13 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/detached-dynamicref.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft2020-12/detached-dynamicref.json", 3 | "$schema": "https://json-schema.org/draft/2020-12/schema", 4 | "$defs": { 5 | "foo": { 6 | "$dynamicRef": "#detached" 7 | }, 8 | "detached": { 9 | "$dynamicAnchor": "detached", 10 | "type": "integer" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/ref-and-defs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$id": "http://localhost:1234/draft2020-12/ref-and-defs.json", 4 | "$defs": { 5 | "inner": { 6 | "properties": { 7 | "bar": { "type": "string" } 8 | } 9 | } 10 | }, 11 | "$ref": "#/$defs/inner" 12 | } 13 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/name-defs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "$defs": { 4 | "orNull": { 5 | "anyOf": [ 6 | { 7 | "type": "null" 8 | }, 9 | { 10 | "$ref": "#" 11 | } 12 | ] 13 | } 14 | }, 15 | "type": "string" 16 | } 17 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/name-defs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2019-09/schema", 3 | "$defs": { 4 | "orNull": { 5 | "anyOf": [ 6 | { 7 | "type": "null" 8 | }, 9 | { 10 | "$ref": "#" 11 | } 12 | ] 13 | } 14 | }, 15 | "type": "string" 16 | } 17 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/name-defs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$defs": { 4 | "orNull": { 5 | "anyOf": [ 6 | { 7 | "type": "null" 8 | }, 9 | { 10 | "$ref": "#" 11 | } 12 | ] 13 | } 14 | }, 15 | "type": "string" 16 | } 17 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/tree.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "tree schema, extensible", 3 | "$id": "http://localhost:1234/tree.json", 4 | "$dynamicAnchor": "node", 5 | 6 | "type": "object", 7 | "properties": { 8 | "data": true, 9 | "children": { 10 | "type": "array", 11 | "items": { 12 | "$dynamicRef": "#node" 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /doc/ref/corelib/conversion_error.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::conversion_error 2 | 3 | ```cpp 4 | #include 5 | ``` 6 | 7 | class conversion_error; 8 | ``` 9 | 10 | #### Accessors 11 | 12 | std::error_code code() const noexcept; 13 | Returns an error code. 14 | 15 | const std::string& message_arg() const noexcept 16 | Returns an explanatory string 17 | 18 | std::string message() const; 19 | Returns an error message 20 | 21 | 22 | -------------------------------------------------------------------------------- /doc/ref/jsonpath/functions/min.md: -------------------------------------------------------------------------------- 1 | ### min 2 | 3 | ``` 4 | number|string|null min(array[number]|array[string] value) 5 | ``` 6 | 7 | Returns the lowest number found in an array of numbers, 8 | or the lowest string in an array of strings, or null if 9 | the array is empty 10 | 11 | It is a type error if 12 | 13 | - the provided value is not an array 14 | 15 | - the array contains items that are not all numbers or all strings 16 | 17 | ### Examples 18 | 19 | 20 | -------------------------------------------------------------------------------- /doc/ref/jsonpath/functions/max.md: -------------------------------------------------------------------------------- 1 | ### max 2 | 3 | ``` 4 | number|string|null max(array[number]|array[string] value) 5 | ``` 6 | 7 | Returns the highest number found in an array of numbers, 8 | or the highest string in an array of strings, or null 9 | if the array is empty. 10 | 11 | It is a type error if 12 | 13 | - the provided value is not an array 14 | 15 | - the array contains items that are not all numbers or all strings 16 | 17 | ### Examples 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/input/jsonschema/name-defs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id" : "https://www.example.com/other", 3 | "$schema": "https://json-schema.org/draft/2020-12/schema", 4 | "$defs": { 5 | "orNull": { 6 | "anyOf": [ 7 | { 8 | "type": "null" 9 | }, 10 | { 11 | "$ref": "#" 12 | } 13 | ] 14 | } 15 | }, 16 | "type": "string" 17 | } 18 | -------------------------------------------------------------------------------- /examples_boost/more_examples.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2025 Daniel Parker 2 | // Distributed under Boost license 3 | 4 | #include 5 | 6 | void extensibility_examples(); 7 | void pool_allocator_examples(); 8 | 9 | int main() 10 | { 11 | try 12 | { 13 | extensibility_examples(); 14 | pool_allocator_examples(); 15 | } 16 | catch (const std::exception& e) 17 | { 18 | std::cout << e.what() << '\n'; 19 | } 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/tests/draft4/optional/float-overflow.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "all integers are multiples of 0.5, if overflow is handled", 4 | "schema": {"type": "number", "multipleOf": 0.5}, 5 | "tests": [ 6 | { 7 | "description": "valid if optional overflow handling is implemented", 8 | "data": 1e308, 9 | "valid": true 10 | } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/tests/draft6/optional/float-overflow.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "all integers are multiples of 0.5, if overflow is handled", 4 | "schema": {"type": "integer", "multipleOf": 0.5}, 5 | "tests": [ 6 | { 7 | "description": "valid if optional overflow handling is implemented", 8 | "data": 1e308, 9 | "valid": true 10 | } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/tests/draft7/optional/float-overflow.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "all integers are multiples of 0.5, if overflow is handled", 4 | "schema": {"type": "integer", "multipleOf": 0.5}, 5 | "tests": [ 6 | { 7 | "description": "valid if optional overflow handling is implemented", 8 | "data": 1e308, 9 | "valid": true 10 | } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /doc/ref/corelib/staj_event_type.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::staj_event_type 2 | 3 | ```cpp 4 | #include 5 | 6 | enum class staj_event_type 7 | { 8 | begin_array, 9 | end_array, 10 | begin_object, 11 | end_object, 12 | name, // until 0.150.0 13 | key, // since 0.150.0 14 | string_value, 15 | byte_string_value, 16 | null_value, 17 | bool_value, 18 | int64_value, 19 | uint64_value, 20 | half_value, 21 | double_value 22 | }; 23 | ``` 24 | 25 | -------------------------------------------------------------------------------- /test/jsonschema/issues/draft2020-12/issue-ref.txt: -------------------------------------------------------------------------------- 1 | { 2 | "$comment": "RFC 8141 §2.3.1", 3 | "$schema": "https://json-schema.org/draft/2020-12/schema", 4 | "$id": "urn:example:foo-bar-baz-qux?+CCResolve:cc=uk", 5 | "properties": { 6 | "foo": {"$ref": "#/$defs/bar"} 7 | }, 8 | "$defs": { 9 | "bar": {"type": "string"} 10 | } 11 | } 12 | 13 | {"foo": "bar"} 14 | 15 | Could not open ./jsonschema/JSON-Schema-Test-Suite/remotesexample:foo-bar-baz-qux for schema loading 16 | -------------------------------------------------------------------------------- /fuzzers/fuzz_json_parser_max.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace jsoncons; 5 | 6 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 7 | { 8 | std::string s(reinterpret_cast(data), size); 9 | std::istringstream is(s); 10 | 11 | default_json_visitor visitor; 12 | 13 | json_stream_reader reader(is, visitor); 14 | std::error_code ec; 15 | reader.read(ec); 16 | 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference 2 | version: 2.1 3 | # Use a package of configuration called an orb. 4 | orbs: 5 | # Declare a dependency on the welcome-orb 6 | welcome: circleci/welcome-orb@0.4.1 7 | # Orchestrate or schedule a set of jobs 8 | workflows: 9 | # Name the workflow "welcome" 10 | welcome: 11 | # Run the welcome/run job in its own container 12 | jobs: 13 | - welcome/run 14 | -------------------------------------------------------------------------------- /fuzzers/fuzz_json_encoder.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace jsoncons; 5 | 6 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 7 | { 8 | std::string s(reinterpret_cast(data), size); 9 | std::istringstream is(s); 10 | 11 | std::string s2; 12 | json_string_encoder visitor(s2); 13 | json_stream_reader reader(is, visitor); 14 | std::error_code ec; 15 | reader.read(ec); 16 | 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/corelib/input/json-exception-2.json: -------------------------------------------------------------------------------- 1 | { 2 | // Members 3 | "members" : [ 4 | { 5 | "first_name":"Jane", 6 | "last_name":"Roe", 7 | "events_attended":10, 8 | "accept_waiver_of_liability" : true 9 | }, 10 | { 11 | "first_name":"John", 12 | "last_name":"Doe", 13 | "events_attended":2, 14 | "accept_waiver_of_liability" : true 15 | /* Missing *right* 16 | brace */ 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/tests/draft3/optional/zeroTerminatedFloats.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "some languages do not distinguish between different types of numeric value", 4 | "schema": { 5 | "type": "integer" 6 | }, 7 | "tests": [ 8 | { 9 | "description": "a float is not an integer even without fractional part", 10 | "data": 1.0, 11 | "valid": false 12 | } 13 | ] 14 | } 15 | ] 16 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/tests/draft4/optional/zeroTerminatedFloats.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "some languages do not distinguish between different types of numeric value", 4 | "schema": { 5 | "type": "integer" 6 | }, 7 | "tests": [ 8 | { 9 | "description": "a float is not an integer even without fractional part", 10 | "data": 1.0, 11 | "valid": false 12 | } 13 | ] 14 | } 15 | ] 16 | -------------------------------------------------------------------------------- /test/jsonschema/issues/draft2020-12/issue-email.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "validation of e-mail addresses", 4 | "schema": { 5 | "$schema": "https://json-schema.org/draft/2020-12/schema", 6 | "format": "email" 7 | }, 8 | "tests": [ 9 | { 10 | "description": "an invalid IPv4-address-literal", 11 | "data": "joe.bloggs@[127.0.0.300]", 12 | "valid": false 13 | } 14 | ] 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/tree.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "description": "tree schema, extensible", 4 | "$id": "http://localhost:1234/draft-next/tree.json", 5 | "$dynamicAnchor": "node", 6 | 7 | "type": "object", 8 | "properties": { 9 | "data": true, 10 | "children": { 11 | "type": "array", 12 | "items": { 13 | "$dynamicRef": "#node" 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /doc/ref/csv/csv_mapping_kind.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::csv::csv_mapping_kind 2 | 3 | ```cpp 4 | #include 5 | 6 | enum class csv_mapping_kind 7 | { 8 | n_rows = 1, 9 | n_objects, 10 | m_columns 11 | }; 12 | ``` 13 | 14 | Value |Definition 15 | -----------|----------- 16 | n_rows | Map a CSV file to an array of arrays in a `basic_json`. 17 | n_objects | Map a CSV file to an array of objects in a `basic_json`. 18 | m_columns | Map a CSV file to an object with name/array-value pairs. 19 | 20 | 21 | -------------------------------------------------------------------------------- /include/jsoncons_ext/jsonschema/jsonschema.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2025 Daniel Parker 2 | // Distributed under the Boost license, Version 1.0. 3 | // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | // See https://github.com/danielaparker/jsoncons for latest version 6 | 7 | #ifndef JSONCONS_EXT_JSONSCHEMA_JSONSCHEMA_HPP 8 | #define JSONCONS_EXT_JSONSCHEMA_JSONSCHEMA_HPP 9 | 10 | #include 11 | 12 | #endif // JSONCONS_EXT_JSONSCHEMA_JSONSCHEMA_HPP 13 | -------------------------------------------------------------------------------- /doc/ref/jsonschema/schema_error.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::jsonschema::schema_error 2 | 3 | ```cpp 4 | #include 5 | ``` 6 | 7 |
8 | 9 | `jsoncons::jsonschema::schema_error` defines an exception type for reporting failures in jsonschema operations. 10 | 11 | ![schema_error](./diagrams/schema_error.png) 12 | 13 | #### Constructors 14 | 15 | schema_error(const std::string& message); 16 | 17 | #### Member functions 18 | 19 | const char* what() const noexcept 20 | Returns an error message 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/corelib/input/members.json: -------------------------------------------------------------------------------- 1 | { 2 | // Members 3 | "members" : [ 4 | { 5 | "first_name":"Jane", 6 | "last_name":"Roe", 7 | "events_attended":10, 8 | "accept_waiver_of_liability" : true 9 | }, 10 | { 11 | "first_name":"John", 12 | "last_name":"Doe", 13 | "events_attended":2, 14 | "accept_waiver_of_liability" : true 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/tree.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "tree schema, extensible", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "$id": "http://localhost:1234/draft2019-09/tree.json", 5 | "$dynamicAnchor": "node", 6 | 7 | "type": "object", 8 | "properties": { 9 | "data": true, 10 | "children": { 11 | "type": "array", 12 | "items": { 13 | "$dynamicRef": "#node" 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/tree.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "tree schema, extensible", 3 | "$schema": "https://json-schema.org/draft/2020-12/schema", 4 | "$id": "http://localhost:1234/draft2020-12/tree.json", 5 | "$dynamicAnchor": "node", 6 | 7 | "type": "object", 8 | "properties": { 9 | "data": true, 10 | "children": { 11 | "type": "array", 12 | "items": { 13 | "$dynamicRef": "#node" 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/jsonschema/issues/draft2020-12/issue-uri.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "validation of URIs", 4 | "schema": { 5 | "$schema": "https://json-schema.org/draft/2020-12/schema", 6 | "format": "uri" 7 | }, 8 | "tests": [ 9 | { 10 | "description": "a valid URL with many special characters", 11 | "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com", 12 | "valid": true 13 | } 14 | ] 15 | } 16 | ] 17 | 18 | -------------------------------------------------------------------------------- /.clang-tidy: -------------------------------------------------------------------------------- 1 | # Copyright 2013-2024 Daniel Parker 2 | # Distributed under the Boost license, Version 1.0. 3 | # (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | # See https://github.com/danielaparker/jsoncons for latest version 6 | 7 | # Revisit: 8 | # fuchsia-virtual-inheritance 9 | 10 | Checks: 'misc-header-include-cycle, 11 | misc-include-cleaner, 12 | llvm-header-guard' 13 | 14 | CheckOptions: 15 | - key: hicpp-special-member-functions.AllowSoleDefaultDtor 16 | value: 1 17 | 18 | WarningsAsErrors: '*' 19 | -------------------------------------------------------------------------------- /test/common/test_utilities.hpp: -------------------------------------------------------------------------------- 1 | #ifndef JSONCONS_TESTS_TEST_UTILITIES_HPP 2 | #define JSONCONS_TESTS_TEST_UTILITIES_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | template 9 | std::string random_binary_string(Generator& gen, std::size_t n) 10 | { 11 | std::string s; 12 | s.reserve(n); 13 | for (std::size_t i = 0; i < n; ++i) 14 | { 15 | auto c = static_cast(std::uniform_int_distribution('0', '1')(gen)); 16 | s.push_back(c); 17 | } 18 | return s; 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /doc/ref/corelib/json/operator=.md: -------------------------------------------------------------------------------- 1 | ### `jsoncons::basic_json::operator=` 2 | 3 | ```cpp 4 | basic_json& operator=(const basic_json& rhs); 5 | basic_json& operator=(basic_json&& rhs) noexcept; (1) 6 | 7 | template 8 | basic_json& operator=(const T& rhs); (2) 9 | 10 | basic_json& operator=(const char_type* rhs); (3) 11 | ``` 12 | 13 | (1) Assigns a new `json` value to a `json` variable, replacing it's current contents. 14 | 15 | (2) Assigns the templated value to a `json` variable using [json_type_traits](json_type_traits/json_type_traits.md). 16 | 17 | -------------------------------------------------------------------------------- /doc/ref/jsonschema/validation_error.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::jsonschema::validation_error 2 | 3 | ```cpp 4 | #include 5 | ``` 6 | 7 |
8 | 9 | `jsoncons::jsonschema::validation_error` defines an exception type for reporting violations of a JSON Schema. 10 | 11 | ![validation_error](./diagrams/validation_error.png) 12 | 13 | #### Constructors 14 | 15 | validation_error(const std::string& message); 16 | 17 | #### Member functions 18 | 19 | const char* what() const noexcept 20 | Returns an error message 21 | 22 | 23 | -------------------------------------------------------------------------------- /doc/ref/csv/quote_style_kind.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::csv::quote_style_kind 2 | 3 | ```cpp 4 | #include 5 | 6 | enum class quote_style_kind 7 | { 8 | minimal, 9 | all, 10 | nonnumeric, 11 | none 12 | }; 13 | ``` 14 | 15 | Value |Definition 16 | -----------|----------- 17 | minimal | Only quote fields that contain special characters, such as a line, field or subfield delimiter, or a quote character. 18 | all | Quote all fields 19 | nonnumeric | Quote all non-numeric fields 20 | none | Never quote fields 21 | 22 | -------------------------------------------------------------------------------- /test/corelib/input/locations.json: -------------------------------------------------------------------------------- 1 | { 2 | // Members 3 | "members" : [ 4 | { 5 | "first_name":"Jane", 6 | "last_name":"Roe", 7 | "events_attended":10, 8 | "accept_waiver_of_liability" : true 9 | }, 10 | /* Error - missing *left* brace */ 11 | "first_name":"John", 12 | "last_name":"Doe", 13 | "events_attended":2, 14 | "accept_waiver_of_liability" : true 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/tests/draft3/optional/format/time.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "validation of time strings", 4 | "schema": { "format": "time" }, 5 | "tests": [ 6 | { 7 | "description": "a valid time string", 8 | "data": "08:30:06", 9 | "valid": true 10 | }, 11 | { 12 | "description": "an invalid time string", 13 | "data": "8:30 AM", 14 | "valid": false 15 | } 16 | ] 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/metaschema-no-validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "$id": "http://localhost:1234/draft-next/metaschema-no-validation.json", 4 | "$vocabulary": { 5 | "https://json-schema.org/draft/next/vocab/applicator": true, 6 | "https://json-schema.org/draft/next/vocab/core": true 7 | }, 8 | "allOf": [ 9 | { "$ref": "https://json-schema.org/draft/next/meta/applicator" }, 10 | { "$ref": "https://json-schema.org/draft/next/meta/core" } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /fuzzers/fuzz_bson.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | using namespace jsoncons; 11 | 12 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 13 | { 14 | std::string input(reinterpret_cast(data), size); 15 | std::istringstream is(input); 16 | try { 17 | json j2 = bson::decode_bson(is); 18 | } 19 | catch(const jsoncons::ser_error&) {} 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/format-assertion-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft-next/format-assertion-true.json", 3 | "$schema": "https://json-schema.org/draft/next/schema", 4 | "$vocabulary": { 5 | "https://json-schema.org/draft/next/vocab/core": true, 6 | "https://json-schema.org/draft/next/vocab/format-assertion": true 7 | }, 8 | "allOf": [ 9 | { "$ref": "https://json-schema.org/draft/next/meta/core" }, 10 | { "$ref": "https://json-schema.org/draft/next/meta/format-assertion" } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/format-assertion-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft-next/format-assertion-false.json", 3 | "$schema": "https://json-schema.org/draft/next/schema", 4 | "$vocabulary": { 5 | "https://json-schema.org/draft/next/vocab/core": true, 6 | "https://json-schema.org/draft/next/vocab/format-assertion": false 7 | }, 8 | "allOf": [ 9 | { "$ref": "https://json-schema.org/draft/next/meta/core" }, 10 | { "$ref": "https://json-schema.org/draft/next/meta/format-assertion" } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/tests/draft2019-09/optional/float-overflow.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "all integers are multiples of 0.5, if overflow is handled", 4 | "schema": { 5 | "$schema": "https://json-schema.org/draft/2019-09/schema", 6 | "type": "integer", "multipleOf": 0.5 7 | }, 8 | "tests": [ 9 | { 10 | "description": "valid if optional overflow handling is implemented", 11 | "data": 1e308, 12 | "valid": true 13 | } 14 | ] 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /fuzzers/fuzz_bson_parser_max.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace jsoncons; 7 | using namespace bson; 8 | 9 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 10 | { 11 | std::string s(reinterpret_cast(data), size); 12 | std::istringstream is(s); 13 | 14 | default_json_visitor visitor; 15 | 16 | bson_stream_reader reader(is, visitor); 17 | std::error_code ec; 18 | reader.read(ec); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /fuzzers/fuzz_csv_encoder.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace jsoncons; 6 | using namespace jsoncons::csv; 7 | 8 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 9 | { 10 | std::string s(reinterpret_cast(data), size); 11 | std::istringstream is(s); 12 | 13 | std::string s2; 14 | csv_string_encoder visitor(s2); 15 | csv_stream_reader reader(is, visitor); 16 | std::error_code ec; 17 | reader.read(ec); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /fuzzers/fuzz_msgpack.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | using namespace jsoncons; 11 | 12 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 13 | { 14 | std::string input(reinterpret_cast(data), size); 15 | std::istringstream is(input); 16 | try { 17 | json j2 = msgpack::decode_msgpack(is); 18 | } 19 | catch(const jsoncons::ser_error&) {} 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/metaschema-no-validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2019-09/schema", 3 | "$id": "http://localhost:1234/draft2019-09/metaschema-no-validation.json", 4 | "$vocabulary": { 5 | "https://json-schema.org/draft/2019-09/vocab/applicator": true, 6 | "https://json-schema.org/draft/2019-09/vocab/core": true 7 | }, 8 | "allOf": [ 9 | { "$ref": "https://json-schema.org/draft/2019-09/meta/applicator" }, 10 | { "$ref": "https://json-schema.org/draft/2019-09/meta/core" } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/metaschema-no-validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$id": "http://localhost:1234/draft2020-12/metaschema-no-validation.json", 4 | "$vocabulary": { 5 | "https://json-schema.org/draft/2020-12/vocab/applicator": true, 6 | "https://json-schema.org/draft/2020-12/vocab/core": true 7 | }, 8 | "allOf": [ 9 | { "$ref": "https://json-schema.org/draft/2020-12/meta/applicator" }, 10 | { "$ref": "https://json-schema.org/draft/2020-12/meta/core" } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/extendible-dynamic-ref.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "extendible array", 3 | "$id": "http://localhost:1234/extendible-dynamic-ref.json", 4 | "type": "object", 5 | "properties": { 6 | "elements": { 7 | "type": "array", 8 | "items": { 9 | "$dynamicRef": "#elements" 10 | } 11 | } 12 | }, 13 | "required": ["elements"], 14 | "additionalProperties": false, 15 | "$defs": { 16 | "elements": { 17 | "$dynamicAnchor": "elements" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/tests/draft-next/optional/float-overflow.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "all integers are multiples of 0.5, if overflow is handled", 4 | "schema": { 5 | "$schema": "https://json-schema.org/draft/next/schema", 6 | "type": "integer", 7 | "multipleOf": 0.5 8 | }, 9 | "tests": [ 10 | { 11 | "description": "valid if optional overflow handling is implemented", 12 | "data": 1e308, 13 | "valid": true 14 | } 15 | ] 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /fuzzers/fuzz_ubjson.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | using namespace jsoncons; 11 | 12 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 13 | { 14 | std::string input(reinterpret_cast(data), size); 15 | std::istringstream is(input); 16 | try { 17 | json j2 = ubjson::decode_ubjson(is); 18 | } 19 | catch(const jsoncons::ser_error&) {} 20 | 21 | return 0; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/format-assertion-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft2020-12/format-assertion-false.json", 3 | "$schema": "https://json-schema.org/draft/2020-12/schema", 4 | "$vocabulary": { 5 | "https://json-schema.org/draft/2020-12/vocab/core": true, 6 | "https://json-schema.org/draft/2020-12/vocab/format-assertion": false 7 | }, 8 | "allOf": [ 9 | { "$ref": "https://json-schema.org/draft/2020-12/meta/core" }, 10 | { "$ref": "https://json-schema.org/draft/2020-12/meta/format-assertion" } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/format-assertion-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "http://localhost:1234/draft2020-12/format-assertion-true.json", 3 | "$schema": "https://json-schema.org/draft/2020-12/schema", 4 | "$vocabulary": { 5 | "https://json-schema.org/draft/2020-12/vocab/core": true, 6 | "https://json-schema.org/draft/2020-12/vocab/format-assertion": true 7 | }, 8 | "allOf": [ 9 | { "$ref": "https://json-schema.org/draft/2020-12/meta/core" }, 10 | { "$ref": "https://json-schema.org/draft/2020-12/meta/format-assertion" } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/tests/draft2020-12/optional/float-overflow.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "all integers are multiples of 0.5, if overflow is handled", 4 | "schema": { 5 | "$schema": "https://json-schema.org/draft/2020-12/schema", 6 | "type": "integer", 7 | "multipleOf": 0.5 8 | }, 9 | "tests": [ 10 | { 11 | "description": "valid if optional overflow handling is implemented", 12 | "data": 1e308, 13 | "valid": true 14 | } 15 | ] 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/tests/draft3/optional/ecmascript-regex.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "ECMA 262 regex dialect recognition", 4 | "schema": { "format": "regex" }, 5 | "tests": [ 6 | { 7 | "description": "[^] is a valid regex", 8 | "data": "[^]", 9 | "valid": true 10 | }, 11 | { 12 | "description": "ECMA 262 has no support for lookbehind", 13 | "data": "(?<=foo)bar", 14 | "valid": false 15 | } 16 | ] 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /examples/build/cmake/README.txt: -------------------------------------------------------------------------------- 1 | To build the jsoncons examples with cmake: 2 | 3 | Windows 4 | 5 | To build the tests with vc140, 6 | 7 | build_vc140x64.cmd 8 | 9 | and to run them 10 | 11 | run_examples_vc140x64.cmd 12 | 13 | UNIX 14 | 15 | From the examples/build/cmake directory 16 | include Config.cmake and Linux.cmake as CMakeLists.txt expects it. 17 | 18 | mkdir -p debug 19 | cd debug 20 | cmake -DCMAKE_BUILD_TYPE=debug -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DARCHIVE_INSTALL_DIR=. -G "Unix Makefiles" .. 21 | make 22 | 23 | From the examples directory 24 | 25 | ./build/cmake/debug/jsoncons_examples 26 | -------------------------------------------------------------------------------- /include/jsoncons/json.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2025 Daniel Parker 2 | // Distributed under the Boost license, Version 1.0. 3 | // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | // See https://github.com/danielaparker/jsoncons for latest version 6 | 7 | #ifndef JSONCONS_JSON_HPP 8 | #define JSONCONS_JSON_HPP 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #endif // JSONCONS_JSON_HPP 17 | 18 | -------------------------------------------------------------------------------- /include/jsoncons_ext/jsonpath/jsonpath.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2025 Daniel Parker 2 | // Distributed under the Boost license, Version 1.0. 3 | // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | // See https://github.com/danielaparker/jsoncons for latest version 6 | 7 | #ifndef JSONCONS_EXT_JSONPATH_JSONPATH_HPP 8 | #define JSONCONS_EXT_JSONPATH_JSONPATH_HPP 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #endif // JSONCONS_EXT_JSONPATH_JSONPATH_HPP 15 | -------------------------------------------------------------------------------- /doc/ref/jsonpointer/unflatten_options.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::jsonpointer::unflatten_options 2 | 3 | ```cpp 4 | #include 5 | 6 | enum class unflatten_options{none,object=1}; 7 | ``` 8 | Specifies how to preserve arrays while unflattening a json object of JSON Pointer-value pairs. 9 | There is no unique solution. 10 | An integer appearing in a path could be an array index or it could be an object key. 11 | 12 | Value |Definition 13 | -----------|----------- 14 | none|Default is to attempt to preserve arrays 15 | assume_object|Assume an integer appearing in a path is an object key 16 | 17 | -------------------------------------------------------------------------------- /fuzzers/fuzz_cbor_parser_max.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | #include 7 | 8 | using namespace jsoncons; 9 | using namespace cbor; 10 | 11 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 12 | { 13 | std::string s(reinterpret_cast(data), size); 14 | std::istringstream is(s); 15 | 16 | default_json_visitor visitor; 17 | 18 | cbor_stream_reader reader(is, visitor); 19 | std::error_code ec; 20 | reader.read(ec); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /test/corelib/input/json-exception-1.json: -------------------------------------------------------------------------------- 1 | { 2 | // Members 3 | "members" : [ 4 | { 5 | "first_name":"Jane", 6 | "last_name":"Roe", 7 | "events_attended":10, 8 | "accept_waiver_of_liability" : true 9 | }, 10 | /* Missing 11 | *left* 12 | brace */ 13 | 14 | "first_name":"John", 15 | "last_name":"Doe", 16 | "events_attended":2, 17 | "accept_waiver_of_liability" : true 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/tests/draft3/optional/format/regex.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "validation of regular expressions", 4 | "schema": { "format": "regex" }, 5 | "tests": [ 6 | { 7 | "description": "a valid regular expression", 8 | "data": "([abc])+\\s+$", 9 | "valid": true 10 | }, 11 | { 12 | "description": "a regular expression with unclosed parens is invalid", 13 | "data": "^(abc]", 14 | "valid": false 15 | } 16 | ] 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /fuzzers/fuzz_msgpack_parser_max.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | #include 7 | 8 | using namespace jsoncons; 9 | using namespace msgpack; 10 | 11 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 12 | { 13 | std::string s(reinterpret_cast(data), size); 14 | std::istringstream is(s); 15 | 16 | default_json_visitor visitor; 17 | 18 | msgpack_stream_reader reader(is, visitor); 19 | std::error_code ec; 20 | reader.read(ec); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /fuzzers/fuzz_bson_encoder.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace jsoncons; 7 | using namespace jsoncons::bson; 8 | 9 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 10 | { 11 | std::string s(reinterpret_cast(data), size); 12 | std::istringstream is(s); 13 | std::vector s1; 14 | bson_bytes_encoder encoder(s1); 15 | bson_stream_reader reader(is, encoder); 16 | 17 | std::error_code ec; 18 | reader.read(ec); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /fuzzers/fuzz_ubjson_parser_max.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | using namespace jsoncons; 8 | using namespace ubjson; 9 | 10 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 11 | { 12 | std::string s(reinterpret_cast(data), size); 13 | std::istringstream is(s); 14 | 15 | default_json_visitor visitor; 16 | 17 | ubjson_stream_reader reader(is, visitor); 18 | std::error_code ec; 19 | reader.read(ec); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/corelib/src/testmain.cpp: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_MAIN 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | TEST_CASE("configuration") 9 | { 10 | #if defined(__clang__) 11 | std::cout << "clang" << "\n"; 12 | #elif defined(__GNUC__) 13 | std::cout << "__GNUC__: " << __GNUC__ << "\n"; 14 | #if defined(__GNUC_MINOR__) 15 | std::cout << "__GNUC_MINOR__" << __GNUC_MINOR__ << "\n"; 16 | #endif 17 | #endif 18 | #if defined(JSONCONS_HAS_STD_REGEX) 19 | std::cout << "JSONCONS_HAS_STD_REGEX\n"; 20 | #endif 21 | } 22 | -------------------------------------------------------------------------------- /fuzzers/fuzz_cbor_encoder.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | #include 7 | 8 | using namespace jsoncons; 9 | using namespace jsoncons::cbor; 10 | 11 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 12 | { 13 | std::string s(reinterpret_cast(data), size); 14 | std::istringstream is(s); 15 | std::vector s1; 16 | cbor_bytes_encoder encoder(s1); 17 | cbor_stream_reader reader(is, encoder); 18 | 19 | std::error_code ec; 20 | reader.read(ec); 21 | 22 | return 0; 23 | } -------------------------------------------------------------------------------- /fuzzers/fuzz_ubjson_encoder.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace jsoncons; 7 | using namespace jsoncons::ubjson; 8 | 9 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 10 | { 11 | std::string s(reinterpret_cast(data), size); 12 | std::istringstream is(s); 13 | std::vector s1; 14 | ubjson_bytes_encoder encoder(s1); 15 | ubjson_stream_reader reader(is, encoder); 16 | 17 | std::error_code ec; 18 | reader.read(ec); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/metaschema-optional-vocabulary.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "$id": "http://localhost:1234/draft-next/metaschema-optional-vocabulary.json", 4 | "$vocabulary": { 5 | "https://json-schema.org/draft/next/vocab/validation": true, 6 | "https://json-schema.org/draft/next/vocab/core": true, 7 | "http://localhost:1234/draft/next/vocab/custom": false 8 | }, 9 | "allOf": [ 10 | { "$ref": "https://json-schema.org/draft/next/meta/validation" }, 11 | { "$ref": "https://json-schema.org/draft/next/meta/core" } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /fuzzers/fuzz_msgpack_encoder.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | #include 6 | 7 | using namespace jsoncons; 8 | using namespace jsoncons::msgpack; 9 | 10 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 11 | { 12 | std::string s(reinterpret_cast(data), size); 13 | std::istringstream is(s); 14 | std::vector s1; 15 | msgpack_bytes_encoder encoder(s1); 16 | msgpack_stream_reader reader(is, encoder); 17 | 18 | std::error_code ec; 19 | reader.read(ec); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /include/jsoncons_ext/bson/bson.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2025 Daniel Parker 2 | // Distributed under the Boost license, Version 1.0. 3 | // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | // See https://github.com/danielaparker/jsoncons for latest version 6 | 7 | #ifndef JSONCONS_EXT_BSON_BSON_HPP 8 | #define JSONCONS_EXT_BSON_BSON_HPP 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #endif // JSONCONS_EXT_BSON_BSON_HPP 17 | -------------------------------------------------------------------------------- /include/jsoncons_ext/cbor/cbor.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2025 Daniel Parker 2 | // Distributed under the Boost license, Version 1.0. 3 | // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | // See https://github.com/danielaparker/jsoncons for latest version 6 | 7 | 8 | #ifndef JSONCONS_EXT_CBOR_CBOR_HPP 9 | #define JSONCONS_EXT_CBOR_CBOR_HPP 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #endif // JSONCONS_EXT_CBOR_CBOR_HPP 18 | 19 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/metaschema-optional-vocabulary.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2019-09/schema", 3 | "$id": "http://localhost:1234/draft2019-09/metaschema-optional-vocabulary.json", 4 | "$vocabulary": { 5 | "https://json-schema.org/draft/2019-09/vocab/validation": true, 6 | "https://json-schema.org/draft/2019-09/vocab/core": true, 7 | "http://localhost:1234/draft/2019-09/vocab/custom": false 8 | }, 9 | "allOf": [ 10 | { "$ref": "https://json-schema.org/draft/2019-09/meta/validation" }, 11 | { "$ref": "https://json-schema.org/draft/2019-09/meta/core" } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/metaschema-optional-vocabulary.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "$id": "http://localhost:1234/draft2020-12/metaschema-optional-vocabulary.json", 4 | "$vocabulary": { 5 | "https://json-schema.org/draft/2020-12/vocab/validation": true, 6 | "https://json-schema.org/draft/2020-12/vocab/core": true, 7 | "http://localhost:1234/draft/2020-12/vocab/custom": false 8 | }, 9 | "allOf": [ 10 | { "$ref": "https://json-schema.org/draft/2020-12/meta/validation" }, 11 | { "$ref": "https://json-schema.org/draft/2020-12/meta/core" } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /test/jsonschema/issues/draft2020-12/issue-unevaluatedItems.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "unevaluatedItems false", 4 | "schema": { 5 | "$schema": "https://json-schema.org/draft/2020-12/schema", 6 | "unevaluatedItems": false 7 | }, 8 | "tests": [ 9 | /*{ 10 | "description": "with no unevaluated items", 11 | "data": [], 12 | "valid": true 13 | },*/ 14 | { 15 | "description": "with unevaluated items", 16 | "data": ["foo"], 17 | "valid": false 18 | } 19 | ] 20 | } 21 | ] 22 | 23 | -------------------------------------------------------------------------------- /doc/ref/corelib/json/emplace_back.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::basic_json::emplace_back 2 | ```cpp 3 | template 4 | json& emplace_back(Args&&... args); 5 | ``` 6 | 7 | #### Parameters 8 | 9 | args 10 | Arguments to forward to the constructor of the json value 11 | 12 | #### Return value 13 | 14 | A reference to the emplaced json value. 15 | 16 | #### Exceptions 17 | 18 | Throws `std::domain_error` if not a json array. 19 | 20 | ### Example 21 | 22 | ```cpp 23 | json arr(json_array_arg); 24 | arr.emplace_back(10); 25 | arr.emplace_back(20); 26 | arr.emplace_back(30); 27 | 28 | std::cout << arr << '\n'; 29 | ``` 30 | Output: 31 | 32 | ```json 33 | [10,20,30] 34 | ``` 35 | 36 | -------------------------------------------------------------------------------- /fuzzers/fuzz_bigint.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace jsoncons; 5 | 6 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 7 | { 8 | std::string input(reinterpret_cast(data), size); 9 | try { 10 | if (size < 5000) // Tests show that it will compute for very large size, but size 316737 taxes Google fuzz patience 11 | { 12 | bigint a("56654250564056135415631554531554513813"); 13 | bigint b(input); 14 | bigint c = a % b; 15 | bigint d = b % a; 16 | } 17 | } 18 | catch (const std::runtime_error&) {} 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft-next/extendible-dynamic-ref.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/next/schema", 3 | "description": "extendible array", 4 | "$id": "http://localhost:1234/draft-next/extendible-dynamic-ref.json", 5 | "type": "object", 6 | "properties": { 7 | "elements": { 8 | "type": "array", 9 | "items": { 10 | "$dynamicRef": "#elements" 11 | } 12 | } 13 | }, 14 | "required": ["elements"], 15 | "additionalProperties": false, 16 | "$defs": { 17 | "elements": { 18 | "$dynamicAnchor": "elements" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /fuzzers/fuzz_cbor.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | #include 7 | 8 | using namespace jsoncons; 9 | using namespace jsoncons::cbor; 10 | 11 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 12 | { 13 | std::string input(reinterpret_cast(data), size); 14 | std::istringstream is(input); 15 | try { 16 | json j2 = decode_cbor(is); 17 | } 18 | catch(const jsoncons::ser_error&) {} 19 | catch(jsoncons::json_runtime_error e2) {} 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2019-09/extendible-dynamic-ref.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "extendible array", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "$id": "http://localhost:1234/draft2019-09/extendible-dynamic-ref.json", 5 | "type": "object", 6 | "properties": { 7 | "elements": { 8 | "type": "array", 9 | "items": { 10 | "$dynamicRef": "#elements" 11 | } 12 | } 13 | }, 14 | "required": ["elements"], 15 | "additionalProperties": false, 16 | "$defs": { 17 | "elements": { 18 | "$dynamicAnchor": "elements" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/jsonschema/JSON-Schema-Test-Suite/remotes/draft2020-12/extendible-dynamic-ref.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "extendible array", 3 | "$schema": "https://json-schema.org/draft/2020-12/schema", 4 | "$id": "http://localhost:1234/draft2020-12/extendible-dynamic-ref.json", 5 | "type": "object", 6 | "properties": { 7 | "elements": { 8 | "type": "array", 9 | "items": { 10 | "$dynamicRef": "#elements" 11 | } 12 | } 13 | }, 14 | "required": ["elements"], 15 | "additionalProperties": false, 16 | "$defs": { 17 | "elements": { 18 | "$dynamicAnchor": "elements" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /include/jsoncons_ext/csv/csv.hpp: -------------------------------------------------------------------------------- 1 | /// Copyright 2013-2025 Daniel Parker 2 | // Distributed under the Boost license, Version 1.0. 3 | // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | // See https://github.com/danielaparker/jsoncons for latest version 6 | 7 | #ifndef JSONCONS_EXT_CSV_CSV_HPP 8 | #define JSONCONS_EXT_CSV_CSV_HPP 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #endif // JSONCONS_EXT_CSV_CSV_HPP 18 | -------------------------------------------------------------------------------- /include/jsoncons_ext/ubjson/ubjson.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2025 Daniel Parker 2 | // Distributed under the Boost license, Version 1.0. 3 | // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | // See https://github.com/danielaparker/jsoncons for latest version 6 | 7 | #ifndef JSONCONS_EXT_UBJSON_UBJSON_HPP 8 | #define JSONCONS_EXT_UBJSON_UBJSON_HPP 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #endif // JSONCONS_EXT_UBJSON_UBJSON_HPP 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: Bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | 12 | 13 | 14 | 15 | **Enumerate the steps to reproduce the bug** 16 | 17 | **Include a small, self-contained example if possible** 18 | 19 | **What compiler, architecture, and operating system?** 20 | 21 | - Compiler: ________ 22 | - Architecture (e.g. x86, x64) ____ 23 | - Operating system: ________ 24 | 25 | **What jsoncons library version?** 26 | 27 | - [ ] Latest release 1.5.0 28 | - [ ] Other release ______ 29 | - [ ] master 30 | -------------------------------------------------------------------------------- /cmake/Config.cmake: -------------------------------------------------------------------------------- 1 | # jsoncons cmake module 2 | # 3 | # This module adds target jsoncons::jsoncons 4 | # 5 | # It also sets the following variables in your project: 6 | # 7 | # jsoncons_FOUND - true if jsoncons found on the system 8 | # jsoncons_INCLUDE_DIRS - the directory containing jsoncons headers 9 | # jsoncons_LIBRARY - empty 10 | 11 | @PACKAGE_INIT@ 12 | 13 | if(NOT TARGET @PROJECT_NAME@::@PROJECT_NAME@) 14 | include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") 15 | get_target_property(@PROJECT_NAME@_INCLUDE_DIRS jsoncons::jsoncons INTERFACE_INCLUDE_DIRECTORIES) 16 | # For compatibility with older versions 17 | add_library(@PROJECT_NAME@ ALIAS @PROJECT_NAME@::@PROJECT_NAME@) 18 | endif() 19 | -------------------------------------------------------------------------------- /doc/ref/corelib/semantic_tag.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::semantic_tag 2 | 3 | ```cpp 4 | #include 5 | 6 | enum class semantic_tag : uint8_t 7 | { 8 | none = 0, 9 | undefined, 10 | datetime, 11 | epoch_seconds, 12 | epoch_milli, 13 | epoch_nano, 14 | bigint, 15 | bigdec, 16 | float128, // since 0.165.0 17 | bigfloat, 18 | base16, 19 | base64, 20 | base64url, 21 | uri, 22 | clamped, 23 | multi_dim_row_major, 24 | multi_dim_column_major, 25 | ext, 26 | id, // since 0.165.0 27 | regex, // since 0.165.0 28 | code // since 0.165.0 29 | }; 30 | ``` 31 | 32 | -------------------------------------------------------------------------------- /doc/ref/jsonschema/schema_version.md: -------------------------------------------------------------------------------- 1 | ### jsoncons::jsonschema::schema_version 2 | 3 | ```cpp 4 | #include 5 | 6 | struct schema_version; 7 | ``` 8 | 9 | Member functions 10 | 11 | static std::string draft4(); 12 | Returns "http://json-schema.org/draft-04/schema#". 13 | 14 | static std::string draft6(); 15 | Returns "http://json-schema.org/draft-06/schema#". 16 | 17 | static std::string draft7(); 18 | Returns "http://json-schema.org/draft-07/schema#". 19 | 20 | static std::string draft201909(); 21 | Returns "https://json-schema.org/draft/2019-09/schema". 22 | 23 | static std::string draft202012(); 24 | Returns "https://json-schema.org/draft/2020-12/schema". 25 | 26 | -------------------------------------------------------------------------------- /include/jsoncons_ext/msgpack/msgpack.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2025 Daniel Parker 2 | // Distributed under the Boost license, Version 1.0. 3 | // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | // See https://github.com/danielaparker/jsoncons for latest version 6 | 7 | #ifndef JSONCONS_EXT_MSGPACK_MSGPACK_HPP 8 | #define JSONCONS_EXT_MSGPACK_MSGPACK_HPP 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #endif // JSONCONS_EXT_MSGPACK_MSGPACK_HPP 17 | 18 | -------------------------------------------------------------------------------- /test/corelib/src/detail/string_view_tests.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2025 Daniel Parker 2 | // Distributed under Boost license 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | TEST_CASE("string_view tests") 9 | { 10 | SECTION("test 1") 11 | { 12 | std::unordered_map map; 13 | 14 | std::string key1{"Foo"}; 15 | std::string key2{"Bar"}; 16 | 17 | map.emplace(key1, 1); 18 | map.emplace(key2, 2); 19 | 20 | CHECK(map.find(key1) != map.end()); 21 | CHECK(1 == map[key1]); 22 | CHECK(map.find(key2) != map.end()); 23 | CHECK(2 == map[key2]); 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /test/jmespath/input/compliance/current.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "given": { 4 | "foo": [{"name": "a"}, {"name": "b"}], 5 | "bar": {"baz": "qux"} 6 | }, 7 | "cases": [ 8 | { 9 | "expression": "@", 10 | "result": { 11 | "foo": [{"name": "a"}, {"name": "b"}], 12 | "bar": {"baz": "qux"} 13 | } 14 | }, 15 | { 16 | "expression": "@.bar", 17 | "result": {"baz": "qux"} 18 | }, 19 | { 20 | "expression": "@.foo[0]", 21 | "result": {"name": "a"} 22 | } 23 | ] 24 | } 25 | ] 26 | --------------------------------------------------------------------------------