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

Refactor Json serialization to accommodate formatters for pretty printing #771

Closed

Conversation

pedrocarlo
Copy link
Contributor

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.

core/json/ser.rs Outdated
}

/// Writes an integer value like `123` to the specified writer.

Copy link
Contributor

Choose a reason for hiding this comment

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

Clippy complains about empty line between comments and functions, fix this should be pretty straightforward.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Already made the changes.

@penberg penberg closed this in 4af6eb2 Jan 29, 2025
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.

3 participants