Serialization of Designspaces mangles lib
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 61
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
I noticed that code like
serde_json::to_value(norad::designspace::DesignSpaceDocument::load(path).unwrap()).unwrap()
returned mangled libs, that look like
{array: {string: "_typoquote"}, dict: {dict: {key: "tH", string: "67"}, key: "F333AEC5-BB61-4D5E-9EDD-6124322D28F2"}, key: "public.skipExportGlyphs"}
when it should instead be https://gitlab.gnome.org/GNOME/cantarell-fonts/-/blob/cd2155cf5696082cc14706e0f93a9ad7a1b4dab1/src/Cantarell.designspace#L74-156. As in, it seems to mirror the verbatim plist structure of separate key and value elements. I don't understand why that happens...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the serde_json::to_value call on DesignSpaceDocument::load(path), using the Cantarell.designspace example linked in the report as the expected structure. Trace how the plist data is represented during serialization and compare the resulting value with the source; done means the serialized library metadata no longer mirrors separate key and value elements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100