Skip to content
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

Bugfix: output decimal.Decimal as number not string to comply with JSONSchema #3

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

mjsqu
Copy link
Owner

@mjsqu mjsqu commented Mar 22, 2023

Description of change

Bugfix: Previously the orjson 'default' handler function set decimal.Decimal types to str, which caused issues with targets that validate JSONSchema strictly. For example target-postgres uses JSONSchema validation, for which number as str is not allowed.

Manual QA steps

  • Tested in local environment with different values for decimal.Decimal records

Risks

  • Existing taps built on top of this variant will see a change to types in some record messages which could have unexpected results

Rollback steps

  • revert this branch

mjsqu added 2 commits March 23, 2023 12:26
Previously the orjson 'default' handler function set `decimal.Decimal` types to str, which caused issues with targets that validate JSONSchema strictly. For example target-postgres uses JSONSchema validation, for which number as str is not allowed.
@mjsqu mjsqu merged commit 0f5497f into master Mar 22, 2023
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