[GH-ISSUE #4] Ability to deserialize into a struct #4

Closed
opened 2026-05-22 22:05:07 +01:00 by JakeStanger · 1 comment
Owner

Originally created by @JakeStanger on GitHub (Jan 27, 2022).
Original GitHub issue: https://github.com/corn-config/corn/issues/4

Currently cornfig::parse returns the a tree of parsed values which isn't super useful for library use. A serde::Deserializer implementation should be written to attempt to deserialize into structs.

It's possible to serialize the Corn output using serde then deserialize it again, but this comes with a lot of overhead and requires shipping another format library.

Originally created by @JakeStanger on GitHub (Jan 27, 2022). Original GitHub issue: https://github.com/corn-config/corn/issues/4 Currently `cornfig::parse` returns the a tree of parsed values which isn't super useful for library use. A `serde::Deserializer` implementation should be written to attempt to deserialize into structs. It's possible to serialize the Corn output using serde then deserialize it again, but this comes with a lot of overhead and requires shipping another format library.
JakeStanger 2026-05-22 22:05:07 +01:00
Author
Owner

@JakeStanger commented on GitHub (Jan 28, 2022):

Similar project that does this that might be worth looking at: https://github.com/ron-rs/ron

<!-- gh-comment-id:1024727497 --> @JakeStanger commented on GitHub (Jan 28, 2022): Similar project that does this that might be worth looking at: https://github.com/ron-rs/ron
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
corn-config/corn#4
No description provided.