Watson API - 检索和排名 - 上传错误 JSON

Watson API - Retrieve and Rank - Error uploading JSON

我正在按照 Retrieve and Rank - Get Started 上的教程进行操作,并且正在进行以下步骤:

Issue the following command to upload the cranfield_data.json data to the example_collection collection. Replace {username}, {password}, {solr_cluster_id}, and {/path_to_file} with your information:

$ curl -X POST -H "Content-Type: application/json" -u "{username}":"{password}" "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters/{solr_cluster_id}/solr/example_collection/update" --data-binary @{/path_to_file}/cranfield_data.json

我正在使用正确的用户名和密码发送请求,并更正 cluster_id 和 json 的路径,但我收到以下错误:

$ curl -X POST -H "Content-Type: application/json" -u "username":"password" "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters/cluster_id/solr/example_collection/update" --data-binary @forum_data/parsed_answers.json

Error: WRRCSH006: Error forwarding request [/solr/example_collection/update] for Solr cluster [sc5b47c5e3_bab3_4aff_a818_f0d786d6dece].

结果 JSON 中有字符导致格式错误。

只需验证 JSON "parsed_answers.json",检查所有标点符号,即“;”,“,”是否按照定义的架构正确放置,然后尝试重新上传