I have used the code below to deserialize the json but throwing an error.
Map<String,Object> root =(Map<String,Object>)JSON.deserializeUntyped(res.getBody()));
"Callout error Invalid conversion from runtime type
List<ANY>
toMap<String,ANY>
"
I want to deserialize the JSON using an apex class to get the list of values?
{
"controllerValues": {},
"defaultValue": null,
"eTag" : "",
"url" : "",
"values" : [
{
"attributes": null,
"label": "PicklistValue1",
"validFor": [],
"value": "PicklistValue1"
},
{
"attributes": null,
"label": "PicklistValue2",
"validFor": [],
"value": "PicklistValue2"
}
]
}