Skip to content

Instantly share code, notes, and snippets.

@rafaelnovello
Created April 23, 2012 19:57
Show Gist options
  • Save rafaelnovello/2473419 to your computer and use it in GitHub Desktop.
Save rafaelnovello/2473419 to your computer and use it in GitHub Desktop.
Dados de entrada e saída
Dados de entrada:
input = {
"wishlist": [
{
"sku": 123,
"name": "Kindle"
},{
"sku": 147,
"name": "iPhone"
},{
"name": "Caixa de Nhá Benta Kopenhagen"
},
]
"movies": "Sherlock Holmes, O Último Samurai",
"music": "Victor e Leo, Paula Fernandes, Joss Stone, Kenny Wayne Shepherd,
Apocalyptica, Carrie Underwood, AC/DC, Metallica, Richie Kotzen",
"books": "1984 - George Orwell, O Fim da Infância, Eram os Deuses Astronautas?,
O que você está lendo atualmente?",
"tv": "A prova de tudo, Discovery Channel",
"games": "Resident Evil, Half-Life 2",
"sports": [
{
"id": 105992172764394,
"name": "Taekwondo"
}
],
"favorite_teams": [
{
"id": 56811189152,
"name": "TAEKWONDO TEAM"
}
],
"inspirational_people": [
{
"id": 47144560930,
"name": "Linus Torvalds"
}
]
}
Dados de saída:
output = [
{
"zunnit_id": 123,
"shop_id": 1, # Can be shop name?
"shop_sku": "A1B2",
"match": 5, # max match = 5, min match = 0
"name": "iPad",
"description": "description of product",
"image_url": ["http://image1.jpg"],
"price": "799.99",
"currency": "USD",
"condition":"new", # pode ser novo ou usado
"type": "physical", # fisico, digital (como a amazon representa isso?)
"availability": "50 un.",
"interests_matches":{
"inspirational_people": "Steve Jobs",
"games": "Angry Birds",
},
"wishlist_matches":["iPad",]
},{
"zunnit_id": 124,
"shop_id": 1, # Can be shop name?
"shop_sku": "A1C2",
"match": 4, # max match = 5, min match = 0
"name": "Camisa Barcelona",
"description": "description of product",
"image_url": ["http://image1.jpg"],
"price": "90.99",
"currency": "USD",
"condition":"new", # pode ser novo ou usado
"type": "physical", # fisico, digital (como a amazon representa isso?)
"availability": "50 un.",
"interests_matches":{
"sport": "Soccer",
"favorite_teams": "Barcelona",
},
"wishlist_matches":[]
},{
"zunnit_id": 143,
"shop_id": 1, # Can be shop name?
"shop_sku": "A3B2",
"match": 5, # max match = 5, min match = 0
"name": "O Código Da Vinci",
"description": "description of product",
"image_url": ["http://image1.jpg"],
"price": "9.99",
"currency": "USD",
"condition":"new", # pode ser novo ou usado
"type": "physical", # fisico, digital (como a amazon representa isso?)
"availability": "50 un.",
"interests_matches":{
"books": "Fortaleza Digital",
},
"wishlist_matches":[],
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment