python出现JSON解析出错的问题:‘message‘: “JSON parse error: Unrecognized token ‘adminUserId‘: was expecting (J

报错信息:{‘timestamp’: ‘2020-10-22 22:38:12’, ‘status’: 400, ‘error’: ‘Bad Request’, ‘message’: “JSON parse error: Unrecognized token ‘adminUserId’: was expecting (JSON String, Number, Array, Object or token ‘null’, ‘true’ or ‘false’); nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token ‘adminUserId’: was expecting (JSON String, Number, Array, Object or token ‘null’, ‘true’ or ‘false’)\n at [Source: (PushbackInputStream); line: 1, column: 13]”, ‘path’: ‘/admin/login’}

python出现JSON解析出错的问题:‘message‘: “JSON parse error: Unrecognized token ‘adminUserId‘: was expecting (J
原因:发送请求的时候,关注request headers 的content-type, content-type决定输入参数格式

python出现JSON解析出错的问题:‘message‘: “JSON parse error: Unrecognized token ‘adminUserId‘: was expecting (J
python出现JSON解析出错的问题:‘message‘: “JSON parse error: Unrecognized token ‘adminUserId‘: was expecting (J

改为json=params后,这一步执行成功。