Errors returned with double quotes

When an error is returned it is coming back like this {   "PostCode": "gfghf",   "Error": "Post code not found" } As the PostCode and Error are object property - it should return without double quotes. It is in double quotes, so in javascript we can't get the exact property value. Is it possible for it to provide a return error like this {   PostCode: "gfghf",   Error: "Post code not found" }

Comments

  •  
    Double quotes for key names in JSON is correct - it is not that same as an object. JSON.parse('{"PostCode": "gfghf","Error": "Post code not found"}') will do what you want.
    Posted by Hidden Tue, 02 Mar 2021 13:02:44 GMT


You're not signed in. Please sign-in to report an issue or post a comment.