{“error_code”:500,“message”:“意外字符(“n”(代码110)):需要双引号

发布于 2025-01-09 04:13:47 字数 1035 浏览 0 评论 0原文

我正在执行以下命令,但在 JSON 格式上遇到错误

PS C:\Program Files\PostgreSQL\12\bin> curl.exe -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d '{"name": "sde-connector", "config": {"connector.class": "io.debezium.connector.postgresql.PostgresConnector", "database.hostname": "postgres", "database.port": "5432", "database.user": "postgres", "database.password": "password", "database.dbname": "postgres", "database.server.name": "bankserver1", "table.whitelist": "bank.holding"}}'
HTTP/1.1 500 Internal Server Error
Date: Tue, 22 Feb 2022 23:00:52 GMT
Content-Type: application/json
Content-Length: 240
Server: Jetty(9.4.20.v20190813)

{"error_code":500,"message":"Unexpected character ('n' (code 110)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]"}
PS C:\Program Files\PostgreSQL\12\bin>

尝试了放置 \"name\" 的建议,但它不起作用

I'm executing the following command but I'm getting error on JSON format

PS C:\Program Files\PostgreSQL\12\bin> curl.exe -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d '{"name": "sde-connector", "config": {"connector.class": "io.debezium.connector.postgresql.PostgresConnector", "database.hostname": "postgres", "database.port": "5432", "database.user": "postgres", "database.password": "password", "database.dbname": "postgres", "database.server.name": "bankserver1", "table.whitelist": "bank.holding"}}'
HTTP/1.1 500 Internal Server Error
Date: Tue, 22 Feb 2022 23:00:52 GMT
Content-Type: application/json
Content-Length: 240
Server: Jetty(9.4.20.v20190813)

{"error_code":500,"message":"Unexpected character ('n' (code 110)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]"}
PS C:\Program Files\PostgreSQL\12\bin>

tried the suggestion to put \"name\" but it doesn't work

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文