-
-
Notifications
You must be signed in to change notification settings - Fork 479
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
JsonParser does not handle encoding properly on pactbroker.consumerversionselectors.rawjson #1827
Comments
What version of Pact-JVM are you using? |
4.6.13 |
I have no idea how to replicate this. This test https://github.com/pact-foundation/pact-jvm/blob/master/core/support/src/test/java/au/com/dius/pact/core/support/json/JsonParserTest.java runs on my Windows machine and also on the GitHub Windows agent (see https://github.com/pact-foundation/pact-jvm/actions/runs/11043621468/job/30678203735) without any issue. The JSON parser uses |
I have the same problem. I have a feeling it's because of how the shells handle systemProperties in Windows differently than on MacOS. Also there seems to be a difference when run from Intellij or from shell directly. |
I tried to pass
pactbroker.consumerversionselectors.rawjson
parameter to Gradle Test task as system property for my junit tests.I tried raw string without success, I tried building in with Gson like this:
Finally, after some more debugging it seems it does not properly handle escaping acrost multiple systems. Currently the only working solution looks like this:
If I use windows one then Linux will keep complain about unrecognized
\
characterif I use linux version (single ) or any standard lib implementation (like Gson) windows will complain:
The text was updated successfully, but these errors were encountered: