You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just after handling this report I recognized the Some('e') line as the E notation:
let parsed = jsonc_parser::parse_to_serde_value("1e-3",&Default::default()).expect("parse to value");let num:f64 = serde_json::from_value(parsed.into()).expect("parse to float");// 1e3 => 1000.0// 1e+3 => 1000.0// 1e-3 => 0.001println!("{:#?}", num);
While comparing this crate to json5, I was thrown off a bit by all the extra parsing supported beyond what is expected for jsonc 😅 (most features seem to parse at a glance, beyond the number examples)
While this is a JSON5 feature rather than JSONC, the parser seems to implement support but fails?:
Outputs error:
jsonc-parser/src/scanner.rs
Lines 272 to 293 in abd65a8
Or is this observation a misunderstanding? (it was first noted here)
It does seem accurate that this crate is more of a JSON5 parser than a JSONC one?
The text was updated successfully, but these errors were encountered: