Skip to content

Upgrade jackson and serailize with single quote char - #910

Merged
jasmith-hs merged 3 commits into
masterfrom
single-quote-char
Oct 5, 2022
Merged

Upgrade jackson and serailize with single quote char#910
jasmith-hs merged 3 commits into
masterfrom
single-quote-char

Conversation

@jasmith-hs

Copy link
Copy Markdown
Contributor

Speed up serialization by not needing to do a regex replace on double quotes. Instead in jackson 2.10, they introduced the ability to specify the quote character. If we set the quote character to be a single quote rather than a double quote, then we don't have to use regex to replace the double quotes later.

@jasmith-hs
jasmith-hs marked this pull request as draft September 9, 2022 18:14

@jboulterjboulter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

scary, but exciting!

.replaceAll("(?<!\\\\)(\\\\\\\\)*(?:\")", "$1'");
if (!result.contains("{{")) {
return String.join("} ", result.split("}(?=})"));
if (string.contains("}}") && !string.contains("{{")) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

there are config values for these

@jasmith-hs
jasmith-hs marked this pull request as ready for review October 5, 2022 20:31
@jasmith-hs
jasmith-hs merged commit 7d33701 into masterOct 5, 2022
@jasmith-hs
jasmith-hs deleted the single-quote-char branch October 5, 2022 20:52
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jasmith-hs@jboulter