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

Implement serde Serializer/Deserializer::is_human_readable() #792

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

desaikd
Copy link
Contributor

@desaikd desaikd commented Jul 1, 2024

Related PR #791

Description of changes:
This PR works on adding is_human_readable() for Serializer and Deserializer in serde implementation of Ion.

List of changes:

  • Added is_human_readable property in ValueSerializer based on WriteConfig.
  • Added is_human_readable property in ValueDeserializer based on SystemReader's next_item().

Test:
Added a unit test that converts to/from binary and text as well as compares for roundtrip.

Note for reviewer:
Miri test here is failing due to writer code in lazy writer and is unrelated to current change.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@zslayton zslayton left a comment

Choose a reason for hiding this comment

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

There are a couple of clippy warnings to address, but otherwise this LGTM! At a glance I don't think the Miri warnings are caused by this change--I'll look into those separately. They need to be addressed before we cut another release.

src/lazy/value.rs Outdated Show resolved Hide resolved
src/serde/de.rs Outdated Show resolved Hide resolved
src/serde/ser.rs Show resolved Hide resolved
@desaikd desaikd merged commit a9e78b4 into main Jul 2, 2024
29 of 32 checks passed
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.

None yet

2 participants