In a VB.Net application (v4.0 of the .Net Framework) I am making a call to an API that returns the following:
{"CFResponse":{"AccountDetails":[{"AccountNum":"TEST","CurrentBalance":-58.24,"OriginalBalance":1530.01,"TotalPaid":215.33}]}}
I also have a variable (userInfo
) holding an instance of GetUserInfoResult.vb
that has a bunch of set properties from previous logic.
What is a clean way of getting the JSON data mapped to properties on my instance?
CurrentBalance
> userInfo.Balances.CurrentBalance
OriginalBalance
> userInfo.Balances.OriginalBalance
TotalPaid
> userInfo.Balances.TotalPaid