• tyler young 35
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

I'm using the Salesforce.Force NuGet package to upsert records, and if I don't include the Address property on the Lead, it works just fine. When I include Address, it gives the following error (in JSON):

[{"message":"Cannot deserialize instance of Address from VALUE_STRING value IROQUOIS at [line:1, column:21]","errorCode":"JSON_PARSER_ERROR"}]

The relevant JSON sent to the server is:

{"Address":
    {
        "City":"IROQUOIS",
        "Country":"Canada",
        "CountryCode":"CAN",
        "PostalCode":"K0E 1K0",
        "State":"ONTARIO",
        "StateCode":"ON",
        "Street":"SENSITIVE_DATA_HERE"
    },
"Company":"SENSITIVE_DATA_HERE",
"Description":"SENSITIVE_DATA_HERE",
"Email":"SENSITIVE_DATA_HERE"....}


Any ideas on why it's having trouble deserializing the address?
 

I'm using the Salesforce.Force NuGet package to upsert records, and if I don't include the Address property on the Lead, it works just fine. When I include Address, it gives the following error (in JSON):

[{"message":"Cannot deserialize instance of Address from VALUE_STRING value IROQUOIS at [line:1, column:21]","errorCode":"JSON_PARSER_ERROR"}]

The relevant JSON sent to the server is:

{"Address":
    {
        "City":"IROQUOIS",
        "Country":"Canada",
        "CountryCode":"CAN",
        "PostalCode":"K0E 1K0",
        "State":"ONTARIO",
        "StateCode":"ON",
        "Street":"SENSITIVE_DATA_HERE"
    },
"Company":"SENSITIVE_DATA_HERE",
"Description":"SENSITIVE_DATA_HERE",
"Email":"SENSITIVE_DATA_HERE"....}


Any ideas on why it's having trouble deserializing the address?