-
Notifications
You must be signed in to change notification settings - Fork 62
Conversation
strason was very explicit about preserving order of keys, allowing duplicates and not parsing numbers. Is this necessary for jsonrpc? |
@dpc, It isn't strictly necessary for jsonrpc but necessary for bitcoin rpc related crates, serde_json doesn't parse numbers with the |
I'm going to see if I can update I upgraded rust-secp256k1 to serde 1.0 yesterday and have some new ideas about how to preserve strason |
Is there any particular reason to prefer With the Using |
I've updated strason to serde 1.0; the new version is 0.4.0. It is not quite a drop-in replacement but should be close. |
@jeandudey serde_json does not compile with rust 1.14. See serde-rs/json#332 |
@apoelstra I've updated the code to use strason and compiles fines on stable, but on 1.15.0 there are problems with hyper dependencies that don't build. |
Also I have updated |
Thanks! Very frustrating about 1.14.0. See servo/unicode-bidi#46 for some history about this. For now we might have to bump the minimum compiler version for rust-jsonrpc to 1.17. (Which I'm aware brings us down to zero reasons to prefer strason over serde_json -- except that I hope with newer HTTP client dependencies we can get back to 1.14 in the near future.) |
ebfbafd
to
3915f3c
Compare
Signed-off-by: Jean Pierre Dudey <[email protected]>
utACK. Master is not building for me right now because an openssl dep was introduced at some point (wtf, I'm sure I disabled this, but I guess something re-added it in a patch version), and openssl-sys does not even compile anymore. I'll need to fix that in another PR -- will also add travis support and maybe some fuzzers to bring this project more in line with rust-bitcoin norms. |
Never mind - |
ACK. The actual minimum compiler version appears to be 1.21 right now, because the rust-url folks have continued increasing their compiler version. But I'll merge this and publish 0.8 so that a latest-serde version is available, and defer fixing |
Nice work on this. It's great that things have finally moved over to serde, which establishes a consensus. @apoelstra can then take advantage of all the other great features of serde in the future. I'm curious though, is there a reason strason still even exists as a library? |
@alexreg it is the only json parsing library that compiles with Rust 1.14, which is the currently shipping version of rustc in Debian stable on several architectures. |
@apoelstra Oh I see, that problem still. That's an issue with Debian of course, but fair enough. So does your library switch to use serde when available, or what? |
@alexreg no, I do plan to deprecate Currently |
@apoelstra Hmm, what do HTTP libraries have to do with anything? I'm not sure I understand the first point. |
@alexreg rust-jsonrpc implements a HTTP jsonrpc client. |
Sure, but how is that related to what serialisation library is used? |
@alexreg if we can use |
Okay, I see. Very good. So the |
Yes. |
Great. Sorry for the confusion. |
Fixes #6