Reputation: 4334
I have a website that pulls it's data from a JSON API. This is done using JSON.Net to translate the JSON into C# classes and that works great, and has done for months.
However, the developers of the API have released a new version of the API that changes the format of the data returned to me, and so this obviously now no longer fits into my C# classes.
What I am trying to establish is the best way to handle this. I could go and re-write my whole model, but this would mean massive changes to my whole site, so instead I am wondering if I can do some sort of transformation to get this new data format back into my current model. What I really need to know is what is the most efficient way to do this as I don't really want to slow things down too much by doing this transform.
Upvotes: 2
Views: 1045
Reputation: 1186
If the adaption of the existing code is too expensive, you could:
Upvotes: 2