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

Fix for https:/DominoKit/domino-jackson/issues/68 #69

Closed

Conversation

tobias-hammerschmidt
Copy link
Contributor

This is a proposal for fixing #68. I'm using this within my project and it allows a proper roundtrip of NaN/Infinity values from frontend to backend and back to the frontend.

Copy link
Member

@vegegoku vegegoku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR
Would you please include some test cases for this.

@tobias-hammerschmidt
Copy link
Contributor Author

I just added some tests for NaN/Infinity (de)serialization of double values. The client side test for deserializing "NaN" fails though and I haven't sorted out how to fix this. I'm using deserialization of NaN values in my project which is transpiled using j2cl-maven-plugin and haven't observed any issue. As long as the NaN handling is within the transpiled javascript code everything seems to be working.

As a side note maybe it makes sense to also fix the handling of NaN/Infinity (de)serialization for float values?

@vegegoku
Copy link
Member

vegegoku commented Nov 5, 2023

I just added some tests for NaN/Infinity (de)serialization of double values. The client side test for deserializing "NaN" fails though and I haven't sorted out how to fix this. I'm using deserialization of NaN values in my project which is transpiled using j2cl-maven-plugin and haven't observed any issue. As long as the NaN handling is within the transpiled javascript code everything seems to be working.

As a side note maybe it makes sense to also fix the handling of NaN/Infinity (de)serialization for float values?

I am not sure about the error you had, but I un-commented your assertion and did a build with tests and it passed.

I have one note thought, Can you please make the PR against the development branch rather than the master branch? this might require you to rebase your own fork/branch.

@tobias-hammerschmidt
Copy link
Contributor Author

Ok I'll uncomment the single assertion in question, close this PR and create a new one which targets the development branch.

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