Skip to content

feat: Support parse extended json5 syntax #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

b41sh
Copy link
Member

@b41sh b41sh commented Aug 18, 2025

This pull request introduces support for JSON5 syntax when parsing JSON data into the JSONB format. This enhancement provides a more flexible and developer-friendly way to represent JSON data.

Key features included in this PR:

  • Hexadecimal Numbers: Support for hexadecimal number representation, including both integer and floating-point formats (e.g., 0xabc, 0X123.56).
  • NaN and Infinity: Parsing support for NaN (Not a Number) and Infinity values, aligning with JSON5 specifications.
  • Single-Quoted Strings: Strings can now be enclosed in single quotes (e.g., 'abcd').
  • Unquoted Object Keys: Object keys are now allowed without quotes (e.g., { key: "value" }).
  • Case-Insensitive Boolean and Null: The parser now supports case-insensitive parsing of null, true, and false values (e.g., NULL, True, False).
  • Empty String to Null: An empty string is now parsed as null.

This enhancement improves the usability and compatibility of JSONB, making it easier to work with various JSON data sources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant