You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build serde's internal representation directly, and there doesn't seem to be a way to do that via serde, thus far, i've been constructing a proxy for that via using serde_json types directly. But I'm wondering if there's a more efficient way?
serde_value looks like what I need, but it also looks unmaintained, perhaps it's a "done" crate? I'm looking for any recommendations.
The text was updated successfully, but these errors were encountered:
Cool! I notice that everything is boxed unfortunately, is there any potentially workaround to leave "dense" primitive types unboxed (while preserving nullability)?
Not everything is boxed. Only structs, enums and non-null options. Those are boxed because the type is self-referential in those variants. The internal Serde type is also structured in a similar way.
is there any potentially workaround to leave "dense" primitive types unboxed (while preserving nullability)?
Well, non-optional values are treated as Some(value) if you deserialise them into an Option so you can avoid a heap allocation by serialising primitive types directly instead of wrapping them in Some where possible.
I'm trying to build serde's internal representation directly, and there doesn't seem to be a way to do that via
serde
, thus far, i've been constructing a proxy for that via usingserde_json
types directly. But I'm wondering if there's a more efficient way?serde_value
looks like what I need, but it also looks unmaintained, perhaps it's a "done" crate? I'm looking for any recommendations.The text was updated successfully, but these errors were encountered: