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
RawValue is just a pre-serialized string and should be considered a data format just like Value. Currently the only way to construct Box<RawValue> is through serde_json::value::to_raw_value. It is difficult to write functions using intermediate types to be general over Box<RawValue> and Value, while allowing serializing arbitrary impl Serialize into it.
Thus I propose to have a struct RawSerializer: Serializer<Ok = Box<RawValue>> similar to serde_json::value::Serializer. So we can have fn func<IntermRepr: Serializer> with func::<value::RawSerializer> and func::<value::Serializer>.
The text was updated successfully, but these errors were encountered:
RawValue
is just a pre-serialized string and should be considered a data format just likeValue
. Currently the only way to constructBox<RawValue>
is throughserde_json::value::to_raw_value
. It is difficult to write functions using intermediate types to be general overBox<RawValue>
andValue
, while allowing serializing arbitraryimpl Serialize
into it.Thus I propose to have a
struct RawSerializer: Serializer<Ok = Box<RawValue>>
similar toserde_json::value::Serializer
. So we can havefn func<IntermRepr: Serializer>
withfunc::<value::RawSerializer>
andfunc::<value::Serializer>
.The text was updated successfully, but these errors were encountered: