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

Python JSON serialization in test cases #2

Open
OR13 opened this issue Aug 12, 2023 · 1 comment
Open

Python JSON serialization in test cases #2

OR13 opened this issue Aug 12, 2023 · 1 comment

Comments

@OR13
Copy link

OR13 commented Aug 12, 2023

Test cases contain JSON serializations that are python specific.

It would be better to ensure compact JSON is used (no extra spaces)... otherwise implementations will need to adjust their JSON serializer to match Python in order to to match the testcases.

Some additional string cases would also help force errors for any brittle reimplementation of python dumps.

{
  "I'm a 🧊, :cool: string": "with 🌶️, and :pepper:"
}

(, and : have spaces after them in the default JSON serialization used)

@danielfett
Copy link
Contributor

Happy to accept PRs for new test cases :-)

I'll look into the JSON serializiation, although there are more parts that may vary, e.g., the order of elements. My expectation is that JSON is not compared as strings, but based on the decoded content.

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

No branches or pull requests

2 participants