-
Notifications
You must be signed in to change notification settings - Fork 13.4k
json decoding should fail with a more descriptive error #4244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
Comments
Seems non-critical for 0.7. Nominating for milestone 3 (feature complete). |
declined, noncritical |
Still there, still not critical. |
visiting for triage. I'm not sure exactly how to reproduce this but the fail! code is still present. It's in |
Triage: reproduced by #[feature(managed_boxes)];
extern mod extra;
use extra::serialize::Decodable;
use extra::json;
#[deriving(Decodable)]
struct Foo {
x: ~[Foo]
}
fn main() {
let mut x = json::Decoder(json::from_str(r#"{"x": 1}"#).unwrap());
let _: Foo = Decodable::decode(&mut x);
} I'm going through |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now decoding will do a
fail ~"not a list"
if it tries to deserialize the wrong type. We should give some hints as to the type of the value it found.The text was updated successfully, but these errors were encountered: