{
"FeedTypes": [{
"1": "PRODUCT_SUGGESTION",
"2": "SHOP_SUGGESTION"
}],
"Feeds": [{
"FeedType": 1,
"ProductId": 1,
"ShopId": 3,
"ShopName": "French Connection",
"ShopImage": "/French+Connection/French_Connection-Logo-Actual.png",
"ProductName": "Be A Champion Sports Bra",
"ProductThumbnails": [
"/French+Connection/Product+1/Product+1-Main.jpg",
"/French+Connection/Product+1/source_photo-104.jpg",
"/French+Connection/Product+1/source_photo-105.jpg",
"/French+Connection/Product+1/source_photo-106.jpg",
"/French+Connection/Product+1/source_photo-107.jpg",
"/French+Connection/Product+1/source_photo-108.jpg"
],
"CreateTime": 1453917000,
"Like": 1000,
"Description": "Nisolo is an impact focused lifestyle brand that ethically sources products in a manner that positively impacts consumers and producers. For producers, Nisolo offers skills training and safe working conditions, facilitates international market access, and ensures beyond fair trade wages. For consumers, Nisolo’s handmade, classic essentials offer superior design, effortless style, and the ability for consumers to improve livelihoods through their purchases.",
"Caption": "Comfy way to train and exercise",
"Price": 1700,
"Inventory": 20,
"IsExclusive": true,
"Promotion": {
"PromotionPercentage": 30,
"PromotionPrice": 500
}
}, {
"FeedType": 2,
"ShopId": 1,
"ShopName": "Leibal",
"ShopImage": "/Buck+Mason/images.png",
"ShopDescription": "Home&Living. Art Media",
"ShopFollowingStatus": true,
"Products": [{
"Id": 1,
"Name": "The Abyss Table",
"Image": "/Native+Union/Product+2/source_photo-225.jpg",
"Price": 40490,
"Inventory": 20,
"IsExclusive": true,
"Promotion": {
"PromotionPercentage": 30,
"PromotionPrice": 500
}
}, {
"Id": 2,
"Name": "Chic Paradise",
"Image": "/French+Connection/Product+2/dsaa.jpg",
"Price": 12490,
"Inventory": 100,
"IsExclusive": true
}, {
"Id": 3,
"Name": "Black Butterfly Cross",
"Image": "/Native+Union/Product+3/Product+3-Main.jpg",
"Price": 2400,
"Inventory": 5,
"IsExclusive": false
}]
}]
}
I have difference feed type as JSON Format to response to client app like this example.
So i would like to declare “struct” and use it in json.Marshal function. what’s the best practice to do this ?
Thanks for advice