PSeitz / serde_json_borrow

Fast JSON deserialization on borrowed data
MIT License
70 stars 11 forks source link

Implement `Serialize` for `Value` #3

Closed tqwewe closed 1 year ago

tqwewe commented 1 year ago

Value doesn't seem to implement Serialize, but does implement Deserialize. Is there a reason for this? It would be handy to be able to serialize the value, since serializing doesn't need ownership of a value typically.

PSeitz commented 1 year ago

I started it but discontinued, since it's a lot of code to adjust and I didn't need it

I pushed the current (broken) state to the add_serialization branch, if you want to continue https://github.com/PSeitz/serde_json_borrow/blob/add_serialization/src/ser.rs

Or start over from https://github.com/serde-rs/json/blob/master/src/value/ser.rs