-
Notifications
You must be signed in to change notification settings - Fork 324
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
Implement json_quote #763
Implement json_quote #763
Conversation
Maybe it would be better to review first my refactor of json serialization and then later get back to this PR. #771 |
…ty printing' from Pedro Muniz Json serialization logic was pulled from serde_json. Google's json5 serialization code was not flexible enough to allow for pretty printing json, so I believe that the formatter design is a good layer to abstract this logic. This refactor will trivially enable the implementation of json_pretty function from sqlite. My other PR for json_quote, #763, depends a tiny bit on a helper utility from the previous serialization implementation. If this PR is considered first, I will change the code in my other PR to account for this. Reviewed-by: Diego Reis (@diegoreis42) Reviewed-by: Kacper Madej (@madejejej) Closes #771
Hey @pedrocarlo , |
Hey @jussisaurio. Yeah, I need to do that. I was waiting to see if my other refactor was going to get merged before editing this PR again. It got merged, but I still haven't gotten back to this PR. Should be able to do a rebase and some other corrections soon here. This PR is already too many commits behind from main. |
9435c86
to
c63cea2
Compare
@jussisaurio just did the rebase. I think there should be no more merge conflicts. |
e500598
to
1db3392
Compare
Hey @pedrocarlo, I think 56d401f caused some conflicts here. Can you please rebase and let's get this merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good by me. thanks!
Yeah second rebase I had to do already haha. I will do it today. |
cc9bd51
to
b678375
Compare
@penberg just rebased it |
Hi! This is my first PR on the project, so I apologize if I did not follow a convention from the project.
#127
This PR implements json_quote as specified in their source: https://www.sqlite.org/json1.html#jquote. It follows the internal doc guidelines for implementing functions. Most tests were added from sqlite test suite for json_quote, while some others were added by me. Sqlite test suite for json_quote depends on json_valid to test for correct escape control characters, so that specific test at the moment cannot be done the same way.