Ravi Makhija

Ravi Makhija

  • 1.3k
  • 298
  • 825

JSON To Datatable

May 5 2015 2:23 AM
Hello,
 
I want to convert below json to datatable, for that i can create classes but for room types which have another object about room details how to do that part ?  
 
{
"city":"Bengaluru",
"country":"India",
"start_date":"2015-05-23",
"end_date":"2015-05-25",
"party":[
{
"adults":2
}
],
"num_hotels":1,
"hotels":[
{
"hotel_id":"2210648",
"name":"Fortune Select JP Cosmos",
"street":"No 49 Cunningham Crescent Road Behind Sigma Mall",
"city":"Bengaluru",
"postal_code":"560044",
"state":"Karnataka",
"country":"India",
"latitude":12.98971,
"longitude":77.59463,
"phone":"91 (20) 65008171",
"room_types":{
"Standard Room":{
"price":13136.200000,
"fees":0,
"fees_at_checkout":0,
"taxes":0,
"taxes_at_checkout":0,
"final_price":13136.200000,
"currency":"INR",
"num_rooms":1
},
"Executive Room":{
"price":10771.684000,
"fees":0,
"fees_at_checkout":0,
"taxes":0,
"taxes_at_checkout":0,
"final_price":10771.684000,
"currency":"INR",
"num_rooms":1
}
}
}
]
}
 

Answers (6)