0xE2 is an invalid start of a property name

After installing a HAL Validator (), and preparing a CURL request, I received the error "0xE2 is an invalid start of a property name". The response of my HAL service validates as JSON already, so why am I getting this error?

3 Answers

Turns out this error was from parsing a json based configuration file of the validator, not the results from validating a HAL response (which is also json). The json in the configuration file turned out to have left and right double quotes (disallowed) rather than standard double quotes. These characters came from copying from a web browser into an editor when creating the configuration file. Swapping left and right with standard double quotes fixed the issue.

Just beautify the body in postman. My issue got resolved.

For me, the issue was caused by toString method in my POST request:

httpRequest.body(requestParams.toString())

Taking off toString resolved the issue:

httpRequest.body(requestParams);

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like