blocka
11/05/2020, 2:24 PMConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState("22021"), message: "invalid byte sequence for encoding \"UTF8\": 0x00", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("wchar.c"), line: Some(2017), routine: Some("report_invalid_encoding") }) }) })
I tried to replicate this in "raw" postgres:
insert into test (foo) values ('{"a":1}')
and it fails with
invalid input syntax for type json
however
insert into test (foo) values ('{"a": 1}')
adding a space
insert into test (foo) values ('{"a":"1"}')
or sending a string works fine