Skip to content

Add support for option number-format of fn:parse-json#2676

Merged
ChristianGruen merged 1 commit into
BaseXdb:mainfrom
GuntherRademacher:number-format
May 26, 2026
Merged

Add support for option number-format of fn:parse-json#2676
ChristianGruen merged 1 commit into
BaseXdb:mainfrom
GuntherRademacher:number-format

Conversation

@GuntherRademacher
Copy link
Copy Markdown
Member

@GuntherRademacher GuntherRademacher commented May 26, 2026

These changes add support for option number-format to

  • fn:parse-json
  • fn:json-doc
  • json:parse

It replaces option number-parser for these functions. number-parser continues to be supported for fn:json-to-xml.

All of these options are defined in JsonParserOptions, though the allowances are different for different functions (this was even the case before these changes with option null). Upon invocation, there is an extra check for the option being supported with the particular format, but as it is now, it can only trigger an error upon non-default-values.

There are 14 QT4 test cases using number-parser for fn:parse-json and fn:json-doc, which are now failing because number-parser is rejected.

@ChristianGruen
Copy link
Copy Markdown
Member

…perfect.

@ChristianGruen ChristianGruen merged commit b4ff7ed into BaseXdb:main May 26, 2026
1 of 2 checks passed
@ChristianGruen ChristianGruen deleted the number-format branch May 26, 2026 17:01
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.

2 participants