Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
查询JSON响应返回,解析异常输入意外结束_Json_Api_Request_Postman_Http Get - Fatal编程技术网

查询JSON响应返回,解析异常输入意外结束

查询JSON响应返回,解析异常输入意外结束,json,api,request,postman,http-get,Json,Api,Request,Postman,Http Get,你好 希望你身体健康 我正在尝试使用,并尝试查询响应以仅返回whereprivate\u job:0。我正在使用Postman测试API 当我使用以下请求时,请尽我所能遵循 我得到以下回应: "Parse exception Unexpected end of input, expected term_char, ws0, term or term_end (line 1, pos 14):\nprivate_job:0\n ^\n" 如果我删除了?

你好

希望你身体健康

我正在尝试使用,并尝试查询响应以仅返回where
private\u job:0
。我正在使用Postman测试API

当我使用以下请求时,请尽我所能遵循

我得到以下回应:

"Parse exception Unexpected end of input, expected term_char, ws0, term or term_end (line 1, pos 14):\nprivate_job:0\n             ^\n"
如果我删除了
?q=private\u作业:0
,我会得到一个有效的响应


我显然做错了什么。请协助。

在查询参数中,键名为q

q=私人作业:0

但在文档中,它说应该是fq而不是q


另外,如果您使用的是特殊字符q=private_job:0#,那么在postman的查询参数会话中给出该值,它将为您自动对其进行url编码

这也让我感到困惑,原来我的问题是双重的

首先,此错误是指他们的URL解析器希望看到结尾字符
%23
,因此您的查询字符串需要以该字符结尾


其次,我试图查询
作业类型
,并使用实际字符串值,即
作业类型:永久%23
。这实际上需要是枚举值(在本例中为1)。

非常感谢您的输入,我一度认为我是个白痴(您纠正这一点是正确的),但是如果我尝试
https://domain.vincere.io/api/v2/job/search/fl=job_title,私人工作;sort=published\u date%20asc?fq=private\u job:0
我收到了相同的错误,
“解析异常输入意外结束,预期的term\u char,ws0,term或term\u end(第1行,位置14):\n private\u job:0\n^\n”
https://domain.vincere.io/api/v2/job/search/fl=job_title,私人工作;sort=published\u date asc?fq=private\u job:0%23
您可以从https到%23使用空格和%23尝试此url吗included@Miya,谢谢,我也试过了。如果我尝试
https://domain.vincere.io/api/v2/job/search/fl=job_title,私人工作;sort=published\u date%20asc?fq=“private\u job:0”
,我收到以下错误
“解析异常无效输入”\”,预期查询(第1行,位置1):\n\“private\u job:0\”\n^\n“
"Parse exception Unexpected end of input, expected term_char, ws0, term or term_end (line 1, pos 14):\nprivate_job:0\n             ^\n"