I have this JSON:
{ "Map":
{ "AM":
{ "n": "Armenia"
}
, "AR":
{ "n": "Argentina"
}
, "AU":
{ "n": "Australia"
}
, "BG":
{ "n": "Bulgaria"
}
}
}
and I have two classes:
type
TMap= Class
Fn: String;
end;
Tkop= class
FMap= array of TMap;
end;
I am trying:
var
kop: Tkop;
json: String;
begin
kop:= TJson.JsonToObject<TKop>(json);
It's not working because this is a list of objects and not an array of objects. How can I solve this problem?