Skip to content

JSON snapshots differ with Jackson 2.16 #162

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

Closed
TobiX opened this issue Dec 4, 2023 · 1 comment
Closed

JSON snapshots differ with Jackson 2.16 #162

TobiX opened this issue Dec 4, 2023 · 1 comment

Comments

@TobiX
Copy link
Contributor

TobiX commented Dec 4, 2023

As far as I can see this was broken with FasterXML/jackson-core#1042: The way how spacing is handled in Jackson's PrettyPrinter changed, so https://github.com/origin-energy/java-snapshot-testing/blob/master/java-snapshot-testing-plugin-jackson/src/main/java/au/com/origin/snapshots/jackson/serializers/v1/JacksonSnapshotSerializer.java#L35-L41 doesn't work anymore?!?

I might try to work on a fix. Do you need compatibility with older versions of Jackson or should I just switch to the new API?

@jackmatt2
Copy link
Member

Yeah - we need compatibility with older versions.

Perhaps a new version of the Serializer is required instead of modifying the existing one

v2/JacksonSnapshotSerializer.java

Change the defaults to use the new Serialiser with the exception of a few places

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