【发布时间】:2021-06-16 17:00:51
【问题描述】:
我在做什么: REST API 调用以创建包含融合表的页面。
- 当我使用 POSTMAN 并以 JSON 格式执行给定代码时,它会创建一个带有表格的页面。
{ "title": "Title", "type": "page", "space":{ "key": "spacekeyhere" }, "status": "current", "ancestors": [{ "id": "parentid" }], "body": { "storage":{ "value": "<table data-layout=\"default\"><colgroup><col style=\"width: 226.67px;\" /><col style=\"width: 226.67px;\" /><col style=\"width: 226.67px;\" /></colgroup><tbody><tr><th><p><strong>Col1</strong></p></th><th><p><strong>Col2</strong></p></th><th><p /></th></tr><tr><td><p>AAA</p></td><td><p>A</p></td><td><p /></td></tr><tr><td><p>testing 2</p></td><td><p>B</p></td><td><p /></td></tr></tbody></table>", "representation": "storage" },}}
但是当我在 NODE.js (visual studio) (content-type 仍然是 json) 中使用相同的代码时,它会抛出一个错误:响应:500 内部服务器错误 {"statusCode":500,"message":"org.codehaus.jackson.JsonParseException: Unexpected character ('d' (code 100)): 在 [Source: com.atlassian.plugins .rest.common.limitrequest.jersey.LimitingRequestFilter$1@2eb4e939;行:11,列:39]"}
去掉代码中的 CSS 之后。
改为 , 有效 但是为什么它会导致这种格式出现问题,因为它不应该有任何区别呢?【问题讨论】: