curl -d "{\"name\":\"tom\",\"age\":\"12\",\"address\":\"wuhan\"}"
windows环境使用curl, -d参数内容尽量用双引号,否则报错:
EXTRA *json.SyntaxError=invalid character '\'' looking for beginning of value
windows环境使用curl, -d参数内容尽量用双引号,否则报错:
EXTRA *json.SyntaxError=invalid character '\'' looking for beginning of value
2021-01-15
# 结构体绑定的那一章节,这种json参数请求就提示
# person bind error parsing time ""2020-10-10"" as ""2006-01-02T15:04:05Z07:00"": cannot parse """ as "T"%
curl -H "Content-Type:application/json" -X POST "http://localhost:8080/test" -d '{"name":"a","address":"bj","birthday":"2020-10-10"}'
# person bind error parsing time ""2020-10-10"" as ""2006-01-02T15:04:05Z07:00"": cannot parse """ as "T"%
curl -H "Content-Type:application/json" -X POST "http://localhost:8080/test" -d '{"name":"a","address":"bj","birthday":"2020-10-10"}'
2020-11-03