1

I have the following issue:

When I try to deserialize json I receive an exception because one of the property may have different type. As per the following example:

{ "requestFieldValues ": [{ "fieldId": "description", "label": "Description", "value": "Some string here" }, { "fieldId": "customfield", "label": "Change", "value": { "self": "https://some-url.com", "value": "Normal", "id": "1111" } }] }

Is there a way to deserialize "value" to different data type then just "object"?

EDIT I'm using Newtonsoft.Json:

output = JsonConvert.DeserializeObject<Request>(myjson)
piotr
  • 71
  • 5

0 Answers0