{“error_code”:500,“message”:“意外字符(“n”(代码110)):需要双引号
我正在执行以下命令,但在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论