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
I have the below code; I want to save a raw complex json payload to surreal that has been read into a serde_json::Value struct, however I keep getting an issue with surreal trying to save this back into the Option<Value>, it saves the data into the datastore but then throws the following error: Error: Db(Serialization("invalid type: enum, expected any valid JSON value"))
let json_obj: Value = serde_json::from_reader(reader)?; let value: Option<Value> = db.create("json_data").content(json_obj.clone()).await?;
repo with isolated issue: https://github.com/utx0/surrealdb_serde_issue/
Am I using this incorrectly or is it something else? Pls help.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey guys,
What am I doing wrong here.
I have the below code; I want to save a raw complex json payload to surreal that has been read into a
serde_json::Value
struct, however I keep getting an issue with surreal trying to save this back into theOption<Value>
, it saves the data into the datastore but then throws the following error:Error: Db(Serialization("invalid type: enum, expected any valid JSON value"))
let json_obj: Value = serde_json::from_reader(reader)?; let value: Option<Value> = db.create("json_data").content(json_obj.clone()).await?;
repo with isolated issue:
https://github.com/utx0/surrealdb_serde_issue/
Am I using this incorrectly or is it something else? Pls help.
Thanks
x
Beta Was this translation helpful? Give feedback.
All reactions