asp.net - How to store this JSON string into an API view model? -


i have json string.

{             "line_items": {                             "item1": {                                             "name": "album #1",                                             "sku": "wa01",                                             "fee_taxes": {                                                             "total": {                                                                             "1": "1.62"                                                             },                                                             "subtotal": {                                                                             "1": "1.8"                                                             }                                             }                             },                             "item2": {                                             "name": "single #1",                                             "sku": "ws01",                                             "fee_taxes": {                                                             "total": {                                                                             "1": "0.54"                                                             },                                                             "subtotal": {                                                                             "1": "0.6"                                                             }                                             }                             }             } 

}

we using apis , c# asp.net. i need store json list / array inside view model. not feasible. change json brackets [] make array of items. have been told not because client gave us. possible , how? thank you.

what have here "line_items" has keys of "item1" , "item2". because of this, have either manually parse json object out store keys , values in separate object or push formatted json file brackets described.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -