-
Notifications
You must be signed in to change notification settings - Fork 198
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
Json parse prep #1580
Json parse prep #1580
Conversation
Prep for further changes.
Prep for moving more of our parsing into Rust. The main thing here is that for JSON, we need to continue to ignore unknown fields. It took me a little while but I eventually figured out that using `#[serde(flatten)]` works for this. Seriously: serde is freaking amazingly awesome.
)) | ||
fn treefile_parse_stream( | ||
fmt: InputFormat, | ||
input: &mut io::Read, |
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.
Minor: why the switch away from a generic here? Seems fine either way, just want to understand the motivation.
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.
There were like 2-3 rewrites/false starts here before this patch got split out as a prep for the bigger PR. I don't think there was any deliberate reason, and it does make sense to me to avoid vfuncs here.
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.
(will do a followup)
⚡ Test exempted: pull fully rebased and already tested. |
Prep for moving more of our parsing into Rust. The main thing here is that for JSON, we need to continue to ignore unknown fields. It took me a little while but I eventually figured out that using `#[serde(flatten)]` works for this. Seriously: serde is freaking amazingly awesome. Closes: #1580 Approved by: jlebon
No description provided.