我通过将josn发送到elastic search将数据上载到elastic search服务器,它工作正常,但在一些字符上,例如\it gives error,当我在json中发送反斜杠时,&;如果我转储响应的json,它将给出error
"{"error": {"caused_by": {"reason": "Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes", "type": "not_x_content_exception"}, "reason": "failed to parse", "root_cause": [{"reason": "failed to parse", "type": "mapper_parsing_exception"}], "type": "mapper_parsing_exception"}, "status": 400}"
我的弦是
"{
"first_name":"muhammad irfan",
"middle_name": "",
"last_name":"ulhaq choudhary",
"address":"H,no,197,St,no. 157. G-9\\4",
"city":"Islamabad",
"phone_number1":"",
"phone_number2":"",
"phone_number3":"",
"gender":"M",
"updation_time":"0000-01-01",
"country_id":"1"
}
"
我不知道你用哪种包装。 但是您可以尝试
\\\\
而不是\\
。你知道吗相关问题 更多 >
编程相关推荐