GitHub
05/05/2025, 8:52 PMnan, inf and -inf values as null in Singer stream
Pull request opened by edgarrmondragon
Changes the behavior of JSON serialization for Singer output to convert nan, inf and -inf values to null in compliance with the ECMA-262 specification.
## Implementation details
• simplejson supports this with the `ignore_nan=True`1 parameter.
• msgspec already does this by default2.
## Related
• Closes #2213
## Summary by Sourcery
Modify JSON serialization in Singer output to convert special float values (nan, inf, -inf) to null
Bug Fixes:
• Ensure proper handling of special float values in JSON serialization
Tests:
• Add test case to verify nan values are encoded as null
---
📚 Documentation preview 📚: https://meltano-sdk--3019.org.readthedocs.build/en/3019/
## Footnotes
1. https://simplejson.readthedocs.io/en/latest/#simplejson.dumps ↩️
2. https://jcristharif.com/msgspec/supported-types.html#float ↩️
meltano/sdkGitHub
05/05/2025, 9:03 PMnan, inf and -inf values as null in Singer stream
Pull request merged by edgarrmondragon
meltano/sdk