Apolgies: I forget to mention this is for a Silverlight Solution.
A JSON string is returned from a service as:
{
"710 HUVAL ST (N), LAFAYETTE LA":{
"confidence":0.844,
"fips_county":"22055",
"country_code":"US",
"country_code3":"USA",
"latitude":30.234912,
"street_address":"710 Huval St",
"country_name":"United States",
"longitude":-92.034597,
"street_number":"710",
"region":"LA",
"street_name":"Huval St",
"locality":"Lafayette"
},
"200 ASHLAND PARK, LAFAYETTE LA":{
"confidence":0.844,
"fips_county":"22055",
"country_code":"US",
"country_code3":"USA",
"latitude":30.159882,
"street_address":"200 Ashland Park Dr",
"country_name":"United States",
"longitude":-92.035342,
"street_number":"200",
"region":"LA",
"street_name":"Ashland Park Dr",
"locality":"Lafayette"
}
}
I'm trying to deserialize it into a .NET class. However, I'm running into trouble because each object in the array (and it may be very large, I'm just showing two in the example above) looks to be a different object type to the JSON deserializer in .NET.
Using a tool like JSON to C# to generate the classes will create a class for each of the array objects, which is not ideal given that the results vary from response to response.
I cannot for the life of me figure out the appropriate class(es) to generate in .NET in order to be able to deserialize it. I don't have any control of the JSON service and I am stuck.