I am trying to work with the following return string to parse it to fit the enclosed object. Is there an easy way to map an object to a JSON string so that the returned string can be easily mapped into the object?
Returned string...
{"results": [
{
"priceTags": "$",
"servingTags": [
"TimeofDay",
"TimeofDay"
],
"stateToken": "token-value-here",
"heroTags": [
"Food Item Type 1",
"Food Item Type 2",
"Food Item Type 3"
],
"primaryPhoneNumber", "tel: 555-555-1212"
"activeFoodMenu": [
{
"id": 1,
"menuItems": [
{
"id": 1,
"name": "Single Beef Taco",
"price": 9.99
},
{
"id": 2,
"name": "Single Beef Taco with double sour cream",
"price": 5.99
}
],
"description": "Fresh taco with good to eat stuff in it.",
"name": "Single Beef Taco",
"primaryImage": {
"type": null,
"downloadURL": "http:\\www.blahblahblah.com\picture.png",
"size": null
}
},
{
"id": 2,
"menuItems": [
{
"id": 3,
"name": "Single Beef Taco",
"price": 9.99
},
{
"id": 4,
"name": "Single Beef Taco with double sour cream",
"price": 5.99
}
],
"description": "Fresh taco with good to eat stuff in it.",
"name": "Single Beef Taco",
"primaryImage": {
"type": null,
"downloadURL": "http:\\www.blahblahblah.com\picture.png",
"size": null
}
},
"id": "1234",
"canFavorite": true,
"pickuplocation": {
"addresslineOne": "123 Somewhere street",
"addressLineTwo": "Anytown, State 12345",
"mapURL": "http://www.google.com/maps"
},
"description": "this is an awesome venue",
"isFavorite": null,
"name": "Taco Hell",
"primaryPhoneNumber": "555-555-5555",
"websiteURL": "http",
"acceptedPaymentTags": [
"CreditCard",
"Cash"
]
}
],
"SessionID": "ijlj-9876-fjjf-7120-qapo"
}
Object
ID
stateToken
name
description
isFavorite
canFavorite
heroTags
Returned string...
{"results": [
{
"priceTags": "$",
"servingTags": [
"TimeofDay",
"TimeofDay"
],
"stateToken": "token-value-here",
"heroTags": [
"Food Item Type 1",
"Food Item Type 2",
"Food Item Type 3"
],
"primaryPhoneNumber", "tel: 555-555-1212"
"activeFoodMenu": [
{
"id": 1,
"menuItems": [
{
"id": 1,
"name": "Single Beef Taco",
"price": 9.99
},
{
"id": 2,
"name": "Single Beef Taco with double sour cream",
"price": 5.99
}
],
"description": "Fresh taco with good to eat stuff in it.",
"name": "Single Beef Taco",
"primaryImage": {
"type": null,
"downloadURL": "http:\\www.blahblahblah.com\picture.png",
"size": null
}
},
{
"id": 2,
"menuItems": [
{
"id": 3,
"name": "Single Beef Taco",
"price": 9.99
},
{
"id": 4,
"name": "Single Beef Taco with double sour cream",
"price": 5.99
}
],
"description": "Fresh taco with good to eat stuff in it.",
"name": "Single Beef Taco",
"primaryImage": {
"type": null,
"downloadURL": "http:\\www.blahblahblah.com\picture.png",
"size": null
}
},
"id": "1234",
"canFavorite": true,
"pickuplocation": {
"addresslineOne": "123 Somewhere street",
"addressLineTwo": "Anytown, State 12345",
"mapURL": "http://www.google.com/maps"
},
"description": "this is an awesome venue",
"isFavorite": null,
"name": "Taco Hell",
"primaryPhoneNumber": "555-555-5555",
"websiteURL": "http",
"acceptedPaymentTags": [
"CreditCard",
"Cash"
]
}
],
"SessionID": "ijlj-9876-fjjf-7120-qapo"
}
Object
ID
stateToken
name
description
isFavorite
canFavorite
heroTags
servingTages
acceptedPaymentTags
priceTag
websiteURL
pickupLocation [address object]
activeFoodMenu
primaryImage