neo4j-labs / neo4rs

Neo4j driver for rust

Home Page:https://docs.rs/neo4rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`null` values cannot be handled

s1ck opened this issue · comments

If we have results like:

foo: { bar: { baz: 1337 } }
foo: { bar: null }

and represent that as

#[derive(Deserialize)]
struct Foo {
   bar: Option<Baz>
}

we get InvalidType { received: Unit, expected: "struct Baz" }

In serde_json, null values can be handled that way. Would be nice if we could do it the same way.