-
Notifications
You must be signed in to change notification settings - Fork 148
Closed
Labels
tracked-in-jiraTicket filed in Mongo's Jira systemTicket filed in Mongo's Jira system
Description
Hi everyone, i try convert a String JSON to Document, but i receive a error when key value is a Integer, if i put in quotes number then it's work.
it's work:
let d: Document = serde_json::from_str( &"{ "id" : "1" }".to_string() ).unwrap();
Don't work:
let d: Document = serde_json::from_str( &"{ "id" : 1 }".to_string() ).unwrap();
I receive this message below:
thread '' panicked at 'called Result::unwrap()
on an Err
value: Error("invalid type: integer 1
, expected a signed integer", line: 1, column: 10)'
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
Metadata
Metadata
Assignees
Labels
tracked-in-jiraTicket filed in Mongo's Jira systemTicket filed in Mongo's Jira system