json:无法将对象解组为 []interface {} 类型的 Go 值
我正在使用 krakend 和本地 Nodejs 服务器。
我已经创建了krakend和nodejs服务器。它已启动并正在运行,并且 krakend 和 Nodejs 服务器之间的通信正在正常进行。但是,api 响应是 JSON,同时给出响应 krakend 打印
2022/03/15 02:54:06 KRAKEND ERROR: [ENDPOINT: /contacts] json: cannot unmarshal object into Go value of type []interface {}
虽然我已经在 krankend 中添加了标志 is_collection: "true"
(如此处所示) https://github.com/luraproject/lura/issues/216
但仍然如此抛出同样的错误
I am using krakend and local nodejs server.
As per :
Using KrakenD with local nodejs server
I have created the krakend and nodejs server. It is up and Running and the communication between krakend and nodejs server is properly going on. But, the api response is JSON and while giving response krakend printing
2022/03/15 02:54:06 KRAKEND ERROR: [ENDPOINT: /contacts] json: cannot unmarshal object into Go value of type []interface {}
Although I have already added the flag is_collection: "true"
in krankend (as shown here)
https://github.com/luraproject/lura/issues/216
But still it is throwing the same error
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可以通过删除标志
并添加标志来
完成它我不知道解析响应类型时出现什么问题,但我猜这是 Go build 或其他问题
I am able to get it done via removing the flag
and instead add the flag
I don't know what is the issue while parsing the response type but I guess it an issue with Go build or something else