Add Serialize
and Deserialize
implementations to Value
#28
Labels
enhancement
New feature or request
Serialize
and Deserialize
implementations to Value
#28
Right now
Value
can't be embedded in a type that derives serialize/deserialize because it doesn't implement those traits. There are two approaches: derive or try to do something special. The derive will clearly work, but when embedding within Rsn it might not render as cleanly as one might hope.There are a few challenges when trying to do something special:
Value::Byte
is indistinguishable from small unsigned integers stored in aValue::Integer
Value::Named
uses a Map to store its struct contents. Maps allow any key type. Serde requires that struct field names are strings. We could add a new type for the struct contents that enforces the string key requirement to work around this.The text was updated successfully, but these errors were encountered: