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

fix: Add escape_json function to the serializer #162

Merged
merged 2 commits into from
Sep 6, 2021

Conversation

khorolets
Copy link
Member

No description provided.

@khorolets khorolets requested a review from frol September 6, 2021 13:42
@@ -138,3 +139,20 @@ pub(crate) fn extract_action_type_and_value_from_action_view(
),
}
}

fn escape_json(object: &mut serde_json::Value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a comment here why this function is necessary (NULL-bytes limitation of PostgreSQL in TEXT and JSONB columns) and reference this post: https://www.commandprompt.com/blog/null-characters-workarounds-arent-good-enough/

@khorolets khorolets merged commit 90d8435 into master Sep 6, 2021
@khorolets khorolets deleted the fix/null-byte-in-arg_json branch September 6, 2021 14:06
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