Skip to content

Preserve JSON null spelling in text and XML output - #31

Merged
zhengchun merged 1 commit into
antchfx:masterfrom
rudycelekli:fix/null-text-20261101
Nov 8, 2026
Merged

zhengchun merged 1 commit into
antchfx:masterfrom
rudycelekli:fix/null-text-20261101

Conversation

@rudycelekli

Copy link
Copy Markdown
Contributor

A parsed JSON null retains its native nil value but is formatted as the Go text <nil> by InnerText and XML output. Use the JSON spelling null, consistent with NodeNavigator.Value. Tests cover null versus the string "null", false and zero, round-trip the null node through encoding/xml, and confirm the native value remains nil.

Validation at d2f3d59604e97e3dac22a77198d3f060f2ae3663 (base 823396cf97c3b7cfc2fb3d2424a0ac49faf55aeb):

  • Added regression fails on the unchanged base.
  • go test ./... -count=1 passes.
  • go test -race ./... -count=1 passes.
  • git diff --check passes.

Checks above ran locally on macOS; hosted CI and maintainer review remain separate. Prepared and independently reviewed with Codex assistance.

@zhengchun
zhengchun merged commit bff6aca into antchfx:master Nov 8, 2026
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