Last active
December 15, 2015 00:19
-
-
Save antillas21/5172001 to your computer and use it in GitHub Desktop.
Entity JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"catalog_product_id":4, | |
"created_at":"2013-03-06T19:52:18Z", | |
"entity_type":"Printable", | |
"id":14, | |
"live":true, | |
"properties": { | |
"Quantity":[ | |
{ | |
"option_name":"250", | |
"price_modifier_value":"0", | |
"price_modifier_type":"$" | |
} | |
], | |
"Coating":[ | |
{ | |
"option_name":"UV Coating", | |
"price_modifier_value":"10", | |
"price_modifier_type":"$" | |
} | |
], | |
"Paper Stock":[ | |
{ | |
"option_name":"16pt Paper Stock", | |
"price_modifier_value":"5", | |
"price_modifier_type":"$" | |
} | |
] | |
}, | |
"updated_at":"2013-03-15T18:22:21Z" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"catalog_product_id":4, | |
"created_at":"2013-03-06T19:52:18Z", | |
"entity_type":"Printable", | |
"id":14, | |
"live":true, | |
"properties": { | |
{ | |
"group": "Quantity", | |
"options": [ | |
{ | |
"option_name":"250", | |
"price_modifier_value":"0", | |
"price_modifier_type":"$" | |
} | |
] | |
}, | |
{ | |
"group": "Coating", | |
"options": [ | |
{ | |
"option_name":"UV Coating", | |
"price_modifier_value":"10", | |
"price_modifier_type":"$" | |
}, | |
{ | |
"option_name":"No Coating", | |
"price_modifier_value":"0", | |
"price_modifier_type":"$" | |
} | |
] | |
}, | |
{ | |
"group": "Paper Stock", | |
"options": [ | |
{ | |
"option_name":"16pt Paper Stock", | |
"price_modifier_value":"5", | |
"price_modifier_type":"$" | |
} | |
] | |
} | |
}, | |
"updated_at":"2013-03-15T18:22:21Z" | |
} |
Maybe each JSON could be something like
{
Group: 'Quantity',
options: [ {}, {}, {} ]
}
I was thinking on something a little more like this, co I can have a collection of groups [ { group: '' , options: [] } ]
{
"catalog_product_id":4,
"entity_type":"Printable",
"id":14,
"live":true,
[
{
"group": "Quantity",
"options": [
{
"option_name":"250",
"price_modifier_value":"0",
"price_modifier_type":"$"
}
]
},
{
"group": "Coating",
"options": [
{
"option_name":"UV Coating",
"price_modifier_value":"10",
"price_modifier_type":"$"
},
{
"option_name":"No Coating",
"price_modifier_value":"0",
"price_modifier_type":"$"
}
]
},
{
"group": "Paper Stock",
"options": [
{
"option_name":"16pt Paper Stock",
"price_modifier_value":"5",
"price_modifier_type":"$"
}
]
}
}
]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sense we are using Backbone I think it could be a good idea to have an array of JSONs so we can use them as collections
[ {}, {}, {} ];
But I'm not sure how can we accomplish this