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

Switch from Jackson to plain JSONObjects for exporting message history #1179

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

robinlinden
Copy link
Collaborator

@robinlinden robinlinden commented Nov 7, 2023

Exporting the message history using Jackson on Android 4.4 leads to the app crashing with a NoClassDefFoundError.

See: https://github.com/FasterXML/jackson-databind/issues/2807

I compared a before and after export using diff <(jq . jackson.json) <(jq . jsonobject.json) and this results in no change other than a locationSaved top-level field disappearing.

@robinlinden robinlinden requested a review from theAkito November 7, 2023 00:43
@robinlinden
Copy link
Collaborator Author

After this, it is very little work to change up the format if we want to e.g. not include the public key in every message entry (which we probably don't,) but this change is set up to alter the output as little as possible, including preserving the pretty-printing whitespace. :P

@robinlinden robinlinden marked this pull request as ready for review November 7, 2023 00:54
Exporting the message history using Jackson on Android 4.4 leads to the
app crashing with a NoClassDefFoundError.
Copy link
Collaborator

@theAkito theAkito left a comment

Choose a reason for hiding this comment

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

As long as the root object is this simple to manually construct & we get rid of a superfluous dependency, it's all worth it. It's actually an improvement, despite the root reason being an error in the library.

@robinlinden robinlinden merged commit 36f4cf5 into evilcorpltd:master Nov 9, 2023
10 checks passed
@robinlinden robinlinden deleted the drop-jackson branch November 9, 2023 17:02
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