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

Add ability to override default serialization #2018

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

xrmx
Copy link
Member

@xrmx xrmx commented Mar 29, 2024

What does this pull request do?

This PR introduces a new JSON serialization using simplejson that does a stricter serialization encoding floats like nan, +inf and -inf to null.
Then it makes the json serialization configurable from outside.

Related issues

Refs #1886

Add an alternative json serialization and deserialization implementation
using simplejson configured to be JSON compliant by converting floats like
nan, +inf and -inf to null .
The idea is to permit users to use a different serialization if they
need a different behaviour.

Refs elastic#1886
@xrmx xrmx requested a review from basepi March 29, 2024 10:29
We get a string from config so need to import it.
@xrmx xrmx merged commit 3688340 into elastic:main Mar 29, 2024
92 checks passed
xrmx added a commit to xrmx/apm-agent-python that referenced this pull request Apr 3, 2024
* utils: add simplejson based JSON handling

Add an alternative json serialization and deserialization implementation
using simplejson configured to be JSON compliant by converting floats like
nan, +inf and -inf to null .
The idea is to permit users to use a different serialization if they
need a different behaviour.

Refs elastic#1886

* client: fix overriding of transport json serializer

We get a string from config so need to import it.
xrmx added a commit that referenced this pull request Apr 4, 2024
* utils: add simplejson based JSON handling

Add an alternative json serialization and deserialization implementation
using simplejson configured to be JSON compliant by converting floats like
nan, +inf and -inf to null .
The idea is to permit users to use a different serialization if they
need a different behaviour.

Refs #1886

* client: fix overriding of transport json serializer

We get a string from config so need to import it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants