I need to deserialize this json
{
"partnerName": "moha",
"monetic.to_use": "skynet",
"monetic.mb_id": "MB.00.T",
"monetic.currency": 978,
"monetic.atos.merchant_id": "011223344553333",
"monetic.atos.is_shared": true,
"monetic.atos.data_config": "",
}
into this complex structure
class Config {
string partnerName;
Monetic monetic;
}
class Monetic {
string to_use;
string mb_id;
int currency;
Atos atos;
}
class Atos {
string merchant_id;
bool is_shared;
string data_config;
}
Is there any better (more generic) way to do than manually binding each properties?
Update: We always have only one "complex" item (like monetic
)