Skip to main content
Marie Cole が「#Integration」で質問
I'm running into an issue calling the REST API using PATCH with the following JSON body:

{

    "EmailEmail": "xxxx@xxxx.com"

}

This results in the following error returned by the API. I expect the INVALID_FIELD errorCode because the field doesn't exist, but the message makes no sense considering I can successfully deserialize the content before sending it. What could Salesforce be choking on with such a simple payload?

[

  {

    "message": "Json Deserialization failed on token 'null' and has left off in the middle of parsing a row. Will go to end of row to begin parsing the next row",

    "errorCode": "INVALID_FIELD"

  }

]
1 件の回答
  1. 2017年2月13日 16:24
    Turns out I was using a helper that was serializing the body that was also being serialized elsewhere in my app. I discovered that the helper used .NET's ObjectContent<T>, which serializes whatever value it's given. I just removed the call to JsonConvert.SerializeObject and the response returned the message I was expecting.
0/9000