-
Notifications
You must be signed in to change notification settings - Fork 0
/
json-generator.json
33 lines (32 loc) · 1.01 KB
/
json-generator.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[
'{{repeat(10, 20)}}',
{
"_id": '{{index()}}',
"name": function (_id) {
return "Product " + _id.currentIndex;
},
"description": '{{lorem(1, "paragraphs")}}',
"category": function (feedback) {
var fruits = ['electronics', 'home product', 'sports'];
return fruits[feedback.integer(0, fruits.length - 1)];
},
"image_url": 'http://placehold.it/32x32',
"price": '{{floating(1000, 4000, 2, "$0,0.00")}}',
"feedback": [
'{{repeat(3)}}',
{
"comment": '{{lorem(1, "words")}}',
"rating": '{{floating(0, 5)}}',
"user_name": '{{firstName()}} {{surname()}}',
"added_date": '{{date(new Date(2015, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss Z")}}'
}
],
"deals": {
"isDeal": '{{bool()}}',
"deal_date": '{{date(new Date(2018, 0, 4), new Date(), "YYYY-MM-ddThh:mm:ss Z")}}',
"deal_name": '{{lorem(1, "words")}}',
"deal_discount": '{{floating(0, 70)}}'
},
"avg_rating": '{{floating(0, 5)}}'
}
]