The json functions in Postgres that we use for serialisation don't seem to generate valid JSON. See https://github.com/hasura/graphql-engine/issues/1504.