jsonc-document 2026.10.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jsonc_document-2026.10.15/.gitattributes +3 -0
- jsonc_document-2026.10.15/.github/dependabot.yml +20 -0
- jsonc_document-2026.10.15/.github/workflows/autofix.yml +40 -0
- jsonc_document-2026.10.15/.github/workflows/ci.yml +44 -0
- jsonc_document-2026.10.15/.github/workflows/dependabot-merge.yml +19 -0
- jsonc_document-2026.10.15/.github/workflows/lint.yml +50 -0
- jsonc_document-2026.10.15/.github/workflows/publish-site.yml +34 -0
- jsonc_document-2026.10.15/.github/workflows/release.yml +45 -0
- jsonc_document-2026.10.15/.gitignore +16 -0
- jsonc_document-2026.10.15/.python-version +1 -0
- jsonc_document-2026.10.15/.vale.ini +26 -0
- jsonc_document-2026.10.15/CONTRIBUTING.rst +27 -0
- jsonc_document-2026.10.15/LICENSE +21 -0
- jsonc_document-2026.10.15/MANIFEST.in +6 -0
- jsonc_document-2026.10.15/PKG-INFO +50 -0
- jsonc_document-2026.10.15/README.rst +30 -0
- jsonc_document-2026.10.15/conftest.py +1 -0
- jsonc_document-2026.10.15/docs/__init__.py +1 -0
- jsonc_document-2026.10.15/docs/source/__init__.py +1 -0
- jsonc_document-2026.10.15/docs/source/changelog/2026.10.15.md +3 -0
- jsonc_document-2026.10.15/docs/source/conf.py +22 -0
- jsonc_document-2026.10.15/docs/source/contributing.rst +1 -0
- jsonc_document-2026.10.15/docs/source/index.rst +24 -0
- jsonc_document-2026.10.15/docs/source/parsing.rst +40 -0
- jsonc_document-2026.10.15/prek.toml +668 -0
- jsonc_document-2026.10.15/pyproject.toml +282 -0
- jsonc_document-2026.10.15/setup.cfg +4 -0
- jsonc_document-2026.10.15/spelling_private_dict.txt +302 -0
- jsonc_document-2026.10.15/src/jsonc_document/__init__.py +27 -0
- jsonc_document-2026.10.15/src/jsonc_document/_lexer.py +201 -0
- jsonc_document-2026.10.15/src/jsonc_document/_model.py +142 -0
- jsonc_document-2026.10.15/src/jsonc_document/_parser.py +264 -0
- jsonc_document-2026.10.15/src/jsonc_document/py.typed +0 -0
- jsonc_document-2026.10.15/src/jsonc_document/types.py +7 -0
- jsonc_document-2026.10.15/src/jsonc_document.egg-info/PKG-INFO +50 -0
- jsonc_document-2026.10.15/src/jsonc_document.egg-info/SOURCES.txt +317 -0
- jsonc_document-2026.10.15/src/jsonc_document.egg-info/dependency_links.txt +1 -0
- jsonc_document-2026.10.15/src/jsonc_document.egg-info/not-zip-safe +1 -0
- jsonc_document-2026.10.15/src/jsonc_document.egg-info/scm_file_list.json +314 -0
- jsonc_document-2026.10.15/src/jsonc_document.egg-info/scm_version.json +8 -0
- jsonc_document-2026.10.15/src/jsonc_document.egg-info/top_level.txt +1 -0
- jsonc_document-2026.10.15/styles/snapper/LongProseLine.yml +11 -0
- jsonc_document-2026.10.15/styles/snapper/SemanticLineBreaks.yml +11 -0
- jsonc_document-2026.10.15/tests/__init__.py +1 -0
- jsonc_document-2026.10.15/tests/conformance/LICENSE +21 -0
- jsonc_document-2026.10.15/tests/conformance/UPSTREAM.txt +22 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_1_true_without_comma.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_colon_instead_of_comma.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_comma_after_close.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_comma_and_number.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_double_comma.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_double_extra_comma.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_extra_close.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_extra_comma.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_incomplete.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_incomplete_invalid_value.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_inner_array_no_comma.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_items_separated_by_semicolon.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_just_comma.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_just_minus.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_missing_value.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_newlines_unclosed.json +3 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_number_and_comma.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_number_and_several_commas.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_spaces_vertical_tab_formfeed.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_star_inside.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_unclosed.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_unclosed_trailing_comma.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_unclosed_with_new_lines.json +3 -0
- jsonc_document-2026.10.15/tests/conformance/n_array_unclosed_with_object_inside.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_incomplete_false.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_incomplete_null.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_incomplete_true.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_multidigit_number_then_00.json +0 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_++.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_+1.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_+Inf.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_-01.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_-1.0..json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_-2..json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_-NaN.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_.-1.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_.2e-3.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_0.1.2.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_0.3e+.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_0.3e.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_0.e1.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_0_capital_E+.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_0_capital_E.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_0e+.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_0e.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_1.0e+.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_1.0e-.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_1.0e.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_1_000.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_1eE2.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_2.e+3.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_2.e-3.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_2.e3.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_9.e+.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_Inf.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_NaN.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_U+FF11_fullwidth_digit_one.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_expression.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_hex_1_digit.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_hex_2_digits.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_infinity.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_invalid+-.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_invalid-negative-real.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_minus_infinity.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_minus_sign_with_trailing_garbage.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_minus_space_1.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_neg_int_starting_with_zero.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_neg_real_without_int_part.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_neg_with_garbage_at_end.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_real_garbage_after_e.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_real_without_fractional_part.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_starting_with_dot.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_with_alpha.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_with_alpha_char.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_number_with_leading_zero.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_bad_value.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_bracket_key.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_comma_instead_of_colon.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_double_colon.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_emoji.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_garbage_at_end.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_key_with_single_quotes.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_missing_colon.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_missing_key.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_missing_semicolon.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_missing_value.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_no-colon.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_non_string_key.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_non_string_key_but_huge_number_instead.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_repeated_null_null.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_several_trailing_commas.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_single_quote.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_trailing_comma.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_trailing_comment.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_trailing_comment_open.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_trailing_comment_slash_open.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_trailing_comment_slash_open_incomplete.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_two_commas_in_a_row.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_unquoted_key.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_unterminated-value.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_with_single_string.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_object_with_trailing_garbage.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_single_space.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_1_surrogate_then_escape.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_1_surrogate_then_escape_u.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_1_surrogate_then_escape_u1.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_1_surrogate_then_escape_u1x.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_accentuated_char_no_quotes.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_backslash_00.json +0 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_escape_x.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_escaped_backslash_bad.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_escaped_ctrl_char_tab.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_escaped_emoji.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_incomplete_escape.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_incomplete_escaped_character.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_incomplete_surrogate.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_incomplete_surrogate_escape_invalid.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_invalid_backslash_esc.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_invalid_unicode_escape.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_leading_uescaped_thinspace.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_no_quotes_with_bad_escape.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_single_doublequote.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_single_quote.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_single_string_no_double_quotes.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_start_escape_unclosed.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_unescaped_ctrl_char.json +0 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_unescaped_newline.json +2 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_unescaped_tab.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_unicode_CapitalU.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_string_with_trailing_garbage.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_100000_opening_arrays.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_U+2060_word_joined.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_UTF8_BOM_no_data.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_angle_bracket_..json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_angle_bracket_null.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_array_trailing_garbage.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_array_with_extra_array_close.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_array_with_unclosed_string.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_ascii-unicode-identifier.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_capitalized_True.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_close_unopened_array.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_comma_instead_of_closing_brace.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_double_array.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_end_array.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_lone-open-bracket.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_no_data.json +0 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_null-byte-outside-string.json +0 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_number_with_trailing_garbage.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_object_followed_by_closing_object.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_object_unclosed_no_value.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_object_with_comment.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_object_with_trailing_garbage.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_array_apostrophe.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_array_comma.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_array_object.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_array_open_object.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_array_open_string.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_array_string.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_object.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_object_close_array.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_object_comma.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_object_open_array.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_object_open_string.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_object_string_with_apostrophes.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_open_open.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_single_star.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_trailing_#.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_uescaped_LF_before_string.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_unclosed_array.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_unclosed_array_partial_null.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_unclosed_array_unfinished_false.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_unclosed_array_unfinished_true.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_unclosed_object.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_unicode-identifier.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_whitespace_U+2060_word_joiner.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/n_structure_whitespace_formfeed.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_array_arraysWithSpaces.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_array_empty-string.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_array_empty.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_array_ending_with_newline.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_array_false.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_array_heterogeneous.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_array_null.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_array_with_1_and_newline.json +2 -0
- jsonc_document-2026.10.15/tests/conformance/y_array_with_leading_space.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_array_with_several_null.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_array_with_trailing_space.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_0e+1.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_0e1.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_after_space.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_double_close_to_zero.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_int_with_exp.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_minus_zero.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_negative_int.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_negative_one.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_negative_zero.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_real_capital_e.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_real_capital_e_neg_exp.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_real_capital_e_pos_exp.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_real_exponent.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_real_fraction_exponent.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_real_neg_exp.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_real_pos_exponent.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_simple_int.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_number_simple_real.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_object.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_object_basic.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_object_duplicated_key.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_object_duplicated_key_and_value.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_object_empty.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_object_empty_key.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_object_escaped_null_in_key.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_object_extreme_numbers.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_object_long_strings.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_object_simple.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_object_string_unicode.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_object_with_newlines.json +3 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_1_2_3_bytes_UTF-8_sequences.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_accepted_surrogate_pair.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_accepted_surrogate_pairs.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_allowed_escapes.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_backslash_and_u_escaped_zero.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_backslash_doublequotes.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_comments.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_double_escape_a.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_double_escape_n.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_escaped_control_character.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_escaped_noncharacter.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_in_array.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_in_array_with_leading_space.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_last_surrogates_1_and_2.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_nbsp_uescaped.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_nonCharacterInUTF-8_U+10FFFF.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_nonCharacterInUTF-8_U+FFFF.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_null_escape.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_one-byte-utf-8.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_pi.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_reservedCharacterInUTF-8_U+1BFFF.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_simple_ascii.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_space.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_three-byte-utf-8.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_two-byte-utf-8.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_u+2028_line_sep.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_u+2029_par_sep.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_uEscape.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_uescaped_newline.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_unescaped_char_delete.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_unicode.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_unicodeEscapedBackslash.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_unicode_2.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_unicode_U+10FFFE_nonchar.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_unicode_U+1FFFE_nonchar.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_unicode_U+2064_invisible_plus.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_unicode_U+FDD0_nonchar.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_unicode_U+FFFE_nonchar.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_unicode_escaped_double_quote.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_utf8.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_string_with_del_character.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_structure_lonely_false.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_structure_lonely_int.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_structure_lonely_negative_real.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_structure_lonely_null.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_structure_lonely_string.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_structure_lonely_true.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_structure_string_empty.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_structure_trailing_newline.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_structure_true_in_array.json +1 -0
- jsonc_document-2026.10.15/tests/conformance/y_structure_whitespace_array.json +1 -0
- jsonc_document-2026.10.15/tests/test_conformance.py +37 -0
- jsonc_document-2026.10.15/tests/test_document.py +322 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 2
|
|
3
|
+
|
|
4
|
+
updates:
|
|
5
|
+
- package-ecosystem: pip
|
|
6
|
+
cooldown:
|
|
7
|
+
default-days: 7
|
|
8
|
+
directory: /
|
|
9
|
+
schedule:
|
|
10
|
+
interval: daily
|
|
11
|
+
open-pull-requests-limit: 10
|
|
12
|
+
- package-ecosystem: github-actions
|
|
13
|
+
cooldown:
|
|
14
|
+
default-days: 7
|
|
15
|
+
directory: /
|
|
16
|
+
schedule:
|
|
17
|
+
interval: daily
|
|
18
|
+
|
|
19
|
+
# Dependabot cannot read prek.toml yet:
|
|
20
|
+
# https://github.com/dependabot/dependabot-core/issues/14624
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autofix.ci
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
pull_request: {}
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
autofix:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
fetch-tags: true
|
|
20
|
+
persist-credentials: false
|
|
21
|
+
|
|
22
|
+
- name: Install uv
|
|
23
|
+
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
|
|
24
|
+
|
|
25
|
+
- name: Run fixers
|
|
26
|
+
uses: j178/prek-action@1382ad72dea72f9d53832f2bcb65b3e87a947204 # v3.0.1
|
|
27
|
+
with:
|
|
28
|
+
# Matches the ``prek`` pin in ``pyproject.toml``; keep them in
|
|
29
|
+
# sync. prek reimplements the ``pre-commit-hooks`` checks
|
|
30
|
+
# natively, so a version difference changes their verdicts and
|
|
31
|
+
# not merely their scheduling (issue 4013).
|
|
32
|
+
prek-version: 0.5.5
|
|
33
|
+
extra-args: >-
|
|
34
|
+
--all-files --hook-stage pre-commit --no-fail-fast --verbose
|
|
35
|
+
env:
|
|
36
|
+
UV_NO_CACHE: '1'
|
|
37
|
+
UV_PYTHON: 3.14
|
|
38
|
+
|
|
39
|
+
- uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a # v1.3.4
|
|
40
|
+
if: always()
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: CI
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
pull_request: {}
|
|
8
|
+
workflow_dispatch: {}
|
|
9
|
+
|
|
10
|
+
permissions: {}
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ci-pr-${{ github.event.pull_request.number || github.run_id }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
test:
|
|
18
|
+
runs-on: ${{ matrix.os }}
|
|
19
|
+
timeout-minutes: 15
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
os: [ubuntu-latest, windows-latest]
|
|
24
|
+
python: ['3.12', '3.13', '3.14', '3.15']
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
27
|
+
with:
|
|
28
|
+
persist-credentials: false
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
|
|
31
|
+
with:
|
|
32
|
+
enable-cache: true
|
|
33
|
+
- name: Test with complete branch coverage
|
|
34
|
+
run: uv run --python '${{ matrix.python }}' --group dev pytest --cov --cov-report=term-missing
|
|
35
|
+
completion-ci:
|
|
36
|
+
needs: [test]
|
|
37
|
+
if: ${{ !cancelled() }}
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
timeout-minutes: 5
|
|
40
|
+
steps:
|
|
41
|
+
- name: Check every test job
|
|
42
|
+
env:
|
|
43
|
+
RESULT: ${{ needs.test.result }}
|
|
44
|
+
run: test "$RESULT" = success
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
name: Dependabot auto-merge
|
|
4
|
+
on: pull_request
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: write
|
|
8
|
+
pull-requests: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
dependabot:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
if: github.event.pull_request.user.login == 'dependabot[bot]'
|
|
14
|
+
steps:
|
|
15
|
+
- name: Enable auto-merge for Dependabot PRs
|
|
16
|
+
run: gh pr merge --auto --merge "$PR_URL"
|
|
17
|
+
env:
|
|
18
|
+
PR_URL: ${{github.event.pull_request.html_url}}
|
|
19
|
+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Lint
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
pull_request: {}
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: 0 1 * * *
|
|
10
|
+
workflow_dispatch: {}
|
|
11
|
+
|
|
12
|
+
permissions: {}
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: lint-pr-${{ github.event.pull_request.number || github.run_id }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
lint:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
timeout-minutes: 20
|
|
22
|
+
strategy:
|
|
23
|
+
fail-fast: false
|
|
24
|
+
matrix:
|
|
25
|
+
python: ['3.12', '3.13', '3.14']
|
|
26
|
+
group: [fast, typecheck, pylint, docs]
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
29
|
+
with:
|
|
30
|
+
persist-credentials: false
|
|
31
|
+
fetch-depth: 0
|
|
32
|
+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
|
|
33
|
+
with:
|
|
34
|
+
enable-cache: true
|
|
35
|
+
- uses: j178/prek-action@1382ad72dea72f9d53832f2bcb65b3e87a947204 # v3.0.1
|
|
36
|
+
with:
|
|
37
|
+
prek-version: 0.5.5
|
|
38
|
+
extra-args: --all-files --group ${{ matrix.group }} --verbose
|
|
39
|
+
env:
|
|
40
|
+
UV_PYTHON: ${{ matrix.python }}
|
|
41
|
+
completion-lint:
|
|
42
|
+
needs: [lint]
|
|
43
|
+
if: ${{ !cancelled() }}
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
timeout-minutes: 5
|
|
46
|
+
steps:
|
|
47
|
+
- name: Check every lint job
|
|
48
|
+
env:
|
|
49
|
+
RESULT: ${{ needs.lint.result }}
|
|
50
|
+
run: test "$RESULT" = success
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Deploy documentation
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
pull_request: {}
|
|
8
|
+
|
|
9
|
+
# We often have a long CI queue, so cancel superseded runs for a PR as soon
|
|
10
|
+
# as a new commit is pushed. Non-PR runs (push on main) fall back to the
|
|
11
|
+
# unique run ID so they never cancel each other.
|
|
12
|
+
concurrency:
|
|
13
|
+
group: deploy-docs-pr-${{ github.event.pull_request.number || github.run_id }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
pages:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
environment:
|
|
20
|
+
name: ${{ github.ref_name == 'main' && 'github-pages' || 'development' }}
|
|
21
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
22
|
+
permissions:
|
|
23
|
+
pages: write
|
|
24
|
+
id-token: write
|
|
25
|
+
steps:
|
|
26
|
+
- id: deployment
|
|
27
|
+
uses: sphinx-notes/pages@39eda6fbd411e7cee6e814ef84a69bd806346e92 # v3
|
|
28
|
+
with:
|
|
29
|
+
documentation_path: docs/source
|
|
30
|
+
pyproject_group: dev
|
|
31
|
+
python_version: '3.13'
|
|
32
|
+
sphinx_build_options: -W
|
|
33
|
+
publish: ${{ github.ref_name == 'main' }}
|
|
34
|
+
enablement: ${{ github.ref_name == 'main' }}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Release
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
release:
|
|
6
|
+
types: [published]
|
|
7
|
+
|
|
8
|
+
permissions: {}
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
timeout-minutes: 15
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
18
|
+
with:
|
|
19
|
+
persist-credentials: false
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
|
|
22
|
+
- name: Validate release
|
|
23
|
+
run: |
|
|
24
|
+
uv run --group dev pytest --cov --cov-report=term-missing
|
|
25
|
+
uv build
|
|
26
|
+
uv run --group release check-wheel-contents dist/*.whl
|
|
27
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
|
28
|
+
with:
|
|
29
|
+
name: distributions
|
|
30
|
+
path: dist/
|
|
31
|
+
if-no-files-found: error
|
|
32
|
+
publish:
|
|
33
|
+
needs: [build]
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
timeout-minutes: 10
|
|
36
|
+
environment: release
|
|
37
|
+
permissions:
|
|
38
|
+
id-token: write
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
|
41
|
+
with:
|
|
42
|
+
name: distributions
|
|
43
|
+
path: dist/
|
|
44
|
+
- name: Publish to PyPI using trusted publishing
|
|
45
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
StylesPath = styles
|
|
2
|
+
MinAlertLevel = error
|
|
3
|
+
|
|
4
|
+
Packages = https://github.com/tbhb/vale-ai-tells/releases/download/v1.29.0/ai-tells.zip
|
|
5
|
+
|
|
6
|
+
[*.{rst,md}]
|
|
7
|
+
BasedOnStyles = ai-tells, snapper
|
|
8
|
+
snapper.SemanticLineBreaks = error
|
|
9
|
+
|
|
10
|
+
# These rules misclassify established technical, example, or release-note prose
|
|
11
|
+
# in this repository. All other ai-tells rules remain enforced.
|
|
12
|
+
ai-tells.AbsoluteAssertions = NO
|
|
13
|
+
ai-tells.AnthropomorphicJustification = NO
|
|
14
|
+
ai-tells.CataphoricForecasting = NO
|
|
15
|
+
ai-tells.ColonUsage = NO
|
|
16
|
+
ai-tells.ContrastiveFormulas = NO
|
|
17
|
+
ai-tells.DoubleHyphen = NO
|
|
18
|
+
ai-tells.EmphaticCopula = NO
|
|
19
|
+
ai-tells.EmptyPadding = NO
|
|
20
|
+
ai-tells.EmptyPaddingStacked = NO
|
|
21
|
+
ai-tells.FormalRegister = NO
|
|
22
|
+
ai-tells.FormalTransitions = NO
|
|
23
|
+
ai-tells.OverusedVocabulary = NO
|
|
24
|
+
ai-tells.SemicolonUsage = NO
|
|
25
|
+
ai-tells.ShipOveruse = NO
|
|
26
|
+
ai-tells.VerbTricolon = NO
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Contributing
|
|
2
|
+
============
|
|
3
|
+
|
|
4
|
+
Use the pinned uv version from ``pyproject.toml`` and Python 3.14 for development.
|
|
5
|
+
|
|
6
|
+
.. code-block:: console
|
|
7
|
+
|
|
8
|
+
uv sync --group dev
|
|
9
|
+
uv run prek install
|
|
10
|
+
uv run pytest --cov --cov-report=term-missing
|
|
11
|
+
uv run prek run --all-files --group fast
|
|
12
|
+
uv run prek run --all-files --group typecheck
|
|
13
|
+
uv run prek run --all-files --group pylint
|
|
14
|
+
uv run prek run --all-files --group docs
|
|
15
|
+
|
|
16
|
+
Source and tests require complete statement and branch coverage.
|
|
17
|
+
Public APIs require complete type information, checked by Mypy, Pyright, Pyrefly, and ty.
|
|
18
|
+
Ruff, Pylint, documentation checks, dependency checks, and package metadata checks run through prek.
|
|
19
|
+
CI tests Python 3.12 through 3.15 on Linux and Windows.
|
|
20
|
+
Add regression tests through the public API when changing parser behavior.
|
|
21
|
+
|
|
22
|
+
The vendored JSONC test corpus retains its upstream MIT license and source revision.
|
|
23
|
+
Tests treat duplicate keys as a documented rejection policy.
|
|
24
|
+
Do not add parsing exceptions or suppressions to make conformance tests pass.
|
|
25
|
+
|
|
26
|
+
To release, assemble Towncrier notes, validate the exact commit, tag it with a calendar version, and publish a GitHub release.
|
|
27
|
+
The release workflow tests, builds, checks, and publishes the wheel and source distribution using PyPI trusted publishing.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Adam Dangoor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: jsonc-document
|
|
3
|
+
Version: 2026.10.15
|
|
4
|
+
Summary: Typed JSONC parsing with preserved comments, tokens, and source spans.
|
|
5
|
+
Author-email: Adam Dangoor <adamdangoor@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Documentation, https://adamtheturtle.github.io/jsonc-document/
|
|
8
|
+
Project-URL: Source, https://github.com/adamtheturtle/jsonc-document
|
|
9
|
+
Keywords: comments,jsonc,parser
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
16
|
+
Requires-Python: >=3.12
|
|
17
|
+
Description-Content-Type: text/x-rst
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
jsonc-document
|
|
22
|
+
==============
|
|
23
|
+
|
|
24
|
+
A typed JSONC parser that preserves comments, tokens, and source spans.
|
|
25
|
+
It requires Python 3.12 or newer and has no runtime dependencies.
|
|
26
|
+
|
|
27
|
+
Installation
|
|
28
|
+
------------
|
|
29
|
+
|
|
30
|
+
.. code-block:: console
|
|
31
|
+
|
|
32
|
+
pip install jsonc-document
|
|
33
|
+
|
|
34
|
+
Usage
|
|
35
|
+
-----
|
|
36
|
+
|
|
37
|
+
.. code-block:: python
|
|
38
|
+
|
|
39
|
+
"""Parse JSONC while preserving source comments."""
|
|
40
|
+
|
|
41
|
+
import jsonc_document
|
|
42
|
+
|
|
43
|
+
source = '// heading\n{"count": 2}'
|
|
44
|
+
document = jsonc_document.parse(source=source)
|
|
45
|
+
assert document.value == {"count": 2}
|
|
46
|
+
assert document.comments[0].text == "// heading"
|
|
47
|
+
assert document.to_source() == source
|
|
48
|
+
|
|
49
|
+
Use ``loads(source=...)`` when only Python values are needed.
|
|
50
|
+
See the `documentation <https://adamtheturtle.github.io/jsonc-document/>`_ for the full API and parsing policies.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
jsonc-document
|
|
2
|
+
==============
|
|
3
|
+
|
|
4
|
+
A typed JSONC parser that preserves comments, tokens, and source spans.
|
|
5
|
+
It requires Python 3.12 or newer and has no runtime dependencies.
|
|
6
|
+
|
|
7
|
+
Installation
|
|
8
|
+
------------
|
|
9
|
+
|
|
10
|
+
.. code-block:: console
|
|
11
|
+
|
|
12
|
+
pip install jsonc-document
|
|
13
|
+
|
|
14
|
+
Usage
|
|
15
|
+
-----
|
|
16
|
+
|
|
17
|
+
.. code-block:: python
|
|
18
|
+
|
|
19
|
+
"""Parse JSONC while preserving source comments."""
|
|
20
|
+
|
|
21
|
+
import jsonc_document
|
|
22
|
+
|
|
23
|
+
source = '// heading\n{"count": 2}'
|
|
24
|
+
document = jsonc_document.parse(source=source)
|
|
25
|
+
assert document.value == {"count": 2}
|
|
26
|
+
assert document.comments[0].text == "// heading"
|
|
27
|
+
assert document.to_source() == source
|
|
28
|
+
|
|
29
|
+
Use ``loads(source=...)`` when only Python values are needed.
|
|
30
|
+
See the `documentation <https://adamtheturtle.github.io/jsonc-document/>`_ for the full API and parsing policies.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Repository-wide pytest configuration."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Project documentation."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Project documentation."""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Sphinx documentation configuration."""
|
|
2
|
+
|
|
3
|
+
project = "jsonc-document"
|
|
4
|
+
author = "Adam Dangoor"
|
|
5
|
+
extensions = [
|
|
6
|
+
"myst_parser",
|
|
7
|
+
"sphinx.ext.autodoc",
|
|
8
|
+
"sphinx.ext.intersphinx",
|
|
9
|
+
"sphinx.ext.napoleon",
|
|
10
|
+
"sphinx.ext.doctest",
|
|
11
|
+
"sphinxcontrib.spelling",
|
|
12
|
+
]
|
|
13
|
+
html_theme = "furo"
|
|
14
|
+
nitpicky = True
|
|
15
|
+
spelling_word_list_filename = "../../spelling_private_dict.txt"
|
|
16
|
+
linkcheck_retries = 5
|
|
17
|
+
|
|
18
|
+
autodoc_type_aliases = {
|
|
19
|
+
"Value": "jsonc_document.types.Value",
|
|
20
|
+
"Scalar": "jsonc_document.types.Scalar",
|
|
21
|
+
}
|
|
22
|
+
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.. include:: ../../CONTRIBUTING.rst
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
jsonc-document
|
|
2
|
+
==============
|
|
3
|
+
|
|
4
|
+
.. include:: ../../README.rst
|
|
5
|
+
:start-after: ==============
|
|
6
|
+
|
|
7
|
+
API reference
|
|
8
|
+
-------------
|
|
9
|
+
|
|
10
|
+
.. automodule:: jsonc_document
|
|
11
|
+
:members:
|
|
12
|
+
:imported-members:
|
|
13
|
+
:undoc-members:
|
|
14
|
+
:exclude-members: Scalar, Value
|
|
15
|
+
|
|
16
|
+
.. automodule:: jsonc_document.types
|
|
17
|
+
:members:
|
|
18
|
+
|
|
19
|
+
.. toctree::
|
|
20
|
+
:maxdepth: 1
|
|
21
|
+
|
|
22
|
+
contributing
|
|
23
|
+
parsing
|
|
24
|
+
changelog/2026.10.15
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Parsing contract
|
|
2
|
+
================
|
|
3
|
+
|
|
4
|
+
JSONC adds ``//`` line comments and ``/* ... */`` block comments to JSON.
|
|
5
|
+
Comments are allowed wherever JSON whitespace is allowed.
|
|
6
|
+
Line comments end at CR or LF, including CRLF.
|
|
7
|
+
U+2028 and U+2029 do not end a line comment and are allowed inside strings.
|
|
8
|
+
Trailing commas, unquoted names, single-quoted strings, hexadecimal numbers, ``NaN``, and ``Infinity`` are rejected.
|
|
9
|
+
Whitespace outside strings and comments is limited to space, tab, CR, and LF.
|
|
10
|
+
|
|
11
|
+
Duplicate object keys are rejected, including equivalent escaped spellings.
|
|
12
|
+
Finite numeric literals that overflow or underflow binary64 are rejected.
|
|
13
|
+
Negative zero is preserved.
|
|
14
|
+
UTF-16 surrogate pairs are combined; lone surrogates are retained for callers to apply their own Unicode policy.
|
|
15
|
+
Integers are arbitrary precision within the interpreter's decimal digit limit.
|
|
16
|
+
The nesting limit is 512 collections, enforced without recursive parsing.
|
|
17
|
+
|
|
18
|
+
Use ``tokenize(source=...)`` to inspect every token, including whitespace.
|
|
19
|
+
Token and node spans use half-open Unicode character offsets into the original source.
|
|
20
|
+
``tokenize`` validates individual tokens; ``parse`` validates the complete grammar.
|
|
21
|
+
|
|
22
|
+
``JSONCDecodeError`` provides ``reason``, ``msg``, ``doc``, ``pos``, ``lineno``, and ``colno``.
|
|
23
|
+
Positions refer to the original input, with one-based lines and columns and zero-based offsets.
|
|
24
|
+
CR, LF, and CRLF are recognized when reporting positions.
|
|
25
|
+
|
|
26
|
+
The document is a source snapshot.
|
|
27
|
+
``to_source()`` returns the original text; changing a returned Python collection does not edit that text.
|
|
28
|
+
Source editing is outside this library's API.
|
|
29
|
+
The implementation is independent of JSON5 and has no runtime dependencies.
|
|
30
|
+
|
|
31
|
+
Related libraries
|
|
32
|
+
-----------------
|
|
33
|
+
|
|
34
|
+
`jsonc-parser <https://github.com/NickolaiBeloguzov/jsonc-parser>`_ strips comments before decoding.
|
|
35
|
+
Its existing `comment retention request <https://github.com/NickolaiBeloguzov/jsonc-parser/issues/8>`_ describes the missing capability.
|
|
36
|
+
`json-with-comments <https://github.com/n-takumasa/json-with-comments>`_ can add comments when writing, but discards them when loading.
|
|
37
|
+
``jsonc-document`` instead exposes the original comment tokens and syntax spans for callers to apply their own attachment policies.
|
|
38
|
+
|
|
39
|
+
The grammar follows the `JSONC draft specification <https://jsonc.org/>`_ with trailing commas disabled.
|
|
40
|
+
The documented duplicate-key, numeric-range, and nesting policies further constrain accepted data.
|