我正在使用 PostgREST 7,并想在 PostgreSQL 中进行简单的插入。我的字段之一是 JSON 字符串,将其插入请求的 JSON 正文会破坏 PostgREST 上的解析。
作为使用简单 JSON 字段的示例,请求如下:
curl -k -X POST --header Content-Type: application/json --header Accept: application/json --header Authorization: Bearer asdkfsldkfjsa;kfd;fdj -d {"imagenumber":"12345678", "imagename":"name", "imageversion":"1.0.4.344", "seriousVulnerabilityFound":"false", "report":"{scanResult:{3842483d3c94:{imageId:384241234594,imageSummary:{pass:true}}}}"
是否有一种支持的方式来编码将在 PostgREST 上解码的 JSON 字符串字段,以便该字段可以作为 JSON 列插入 PG 中?