rotty / lexpr-rs

Rust Lisp expression parser and serializer
Apache License 2.0
164 stars 24 forks source link

Add customization of how struct fields (and other things?) are represented? #73

Open elidupree opened 3 years ago

elidupree commented 3 years ago

SerAPI represents struct fields as (name value) (inheriting that behavior from Sexplib, I think), while serde-lexpr represents them as (name . value).

To make serde-lexpr compatible with more kinds of S-expressions, would it make sense to add a customization option that controls which way struct fields are represented? This seems comparable to how serde allows configuration about how enums should be tagged.