Skip to content

fix: serialize NaN values as JSON null - #303

Open
Saim-naushad wants to merge 1 commit into
PowerGridModel:mainfrom
Saim-naushad:fix/164
Open

fix: serialize NaN values as JSON null#303
Saim-naushad wants to merge 1 commit into
PowerGridModel:mainfrom
Saim-naushad:fix/164

Conversation

@Saim-naushad

Copy link
Copy Markdown

Fixes #164

Changes proposed in this PR include

  • Serialize floating-point NaN values as JSON null for standards-compliant output.
  • Preserve backward compatibility when deserializing legacy JSON containing bare NaN.
  • Add regression coverage for file and in-memory JSON serialization.
  • Add a legacy JSON fixture containing NaN.

Validation

  • 619 passed, 1 skipped
  • Ruff, mypy, and pylint checks passed.

AI assistance disclosure

I used OpenAI Codex for repository navigation and test planning. I reviewed and understand the submitted changes and can explain the implementation.

  • If changes are related to CI/CD, are they verified via a manual run on this branch?
  • Do you wish to discuss this PR in the bi-monthly community meeting?

Signed-off-by: Saim-naushad <saimnaushad90@gmail.com>
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.

[BUG] .json NaN is not officially supported

1 participant