Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

this 100%. serde is a bloated monster, its sad that its the popular JSON, because all it does is make Rust look bad in my opinion. here are some smaller options:

https://lib.rs/crates/humphrey_json

https://lib.rs/crates/rust_json

https://lib.rs/crates/sj



The value prop isn't serde_json, it's automatically generated serializers and deserializers for structured data without needing an extra codegen step like with protobufs/capnproto, plus all that machinery decoupled from the actual data format you're reading.

It essentially generates a massive amount of code that you need to write anyway, at the cost of code size and compile time. And a lot of people are happy to make that trade off.

I wouldn't call that a "bloated monster" because of that. Also, none of those options are alternatives to serde_json, unless you restrict yourself to serde_json::Value - which no one does in practice.


> none of those options are alternatives to serde_json, unless you restrict yourself to serde_json::Value - which no one does in practice.

check your facts, all the above options have derive support, serde is not special in that.


merde_json should also be relatively small.


can rust use the json-c library?


I'd assume you could use bindgen and create bindings no problem.


People use rust for its memory safety.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: