json_macros
json_macros copied to clipboard
make json_macros compatible with serde 0.9.x
- serde_json 0.9.x uses
serde_json::Mapinstead ofBTreeMap - added tests for (pretty)printing
- passes all tests for
rustc-serializeandserde_json
Now that serde introduced its own json! macro, you might consider dropping support for serde in the next version.
I would agree with dropping Serde support. I filed #34 to follow up.
@yannleretaille do you have any reasons for using this library with serde 0.9? What motivates the PR?
@dtolnay Actually, I just didn't notice serde_json had introduced a macro until it was already ported :D There might be others who might appreciate that stuff just continues to work as it did before.
Cool. I think the most valuable course of action would be to drop Serde support in this library in favor of serde_json's json! macro (#34) and use the logic from serde_json's json! macro to provide a stable version of this library that works with rustc-serialize (#35).
Although note that rustc-serialize is slated to be deprecated in Rust 1.18... see here.
Sounds like a good plan! #35 looks fairly straightforward to implement and would make a lot of sense. For #34 I think it would be best to keep the feature flag and to either:
- throw an error with instructions on how to move to
serde_json::json - or throw a warning and use
serde_jsons version
Farewell,
json_macros, you served us well!
If it were my library I wouldn't bother with either of those. Just put a prominent note in the readme and people will find it eventually.