hjson-rust
hjson-rust copied to clipboard
from_str method failing with integer types.
Error occured after I passed a string that contains integer/float in the body.
Error
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Syntax("trailing characters", 1, 3)', src/libcore/result.rs:1188:5
Reproducible code
extern crate serde_hjson;
use serde_hjson::{from_str,Value};
fn main (){
let json:Value = from_str("123").unwrap();
}
Reason
https://github.com/hjson/hjson-rust/blob/37c4be8f3a46c0b8818ad73cb0f7cbb6ced49936/hjson/src/de.rs#L130
Why this method is not implemented yet? Can you please implement this?