-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJsonGenerator.txt
141 lines (135 loc) · 5.76 KB
/
JsonGenerator.txt
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
https://www.json-generator.com/
Generate Users Male
[
'{{repeat(50)}}',
{
Name: '{{firstName("male")}} {{surname()}}',
UserName: function(){ return this.Name.split(" ")[0]; },
Gender: 'Male',
DateOfBirth: '{{date(new Date(1980,0,1), new Date(2000, 11, 31), "YYYY-MM-dd")}}',
BloodGroup: '{{random("Ap", "An", "Bp", "Bn", "ABp", "ABn", "Op", "On")}}',
Available:'{{random(true,false,true,false,true)}}',
Address: {
Area:'{{random("Electronic City", "Kengeri","Koramangala","Manyata Tech Park","Marathahalli","Whitefield","Indiranagar","Jayanagar")}}',
City: '{{random("Bengaluru","Mumbai","Kolar","Hydrabad")}}',
State:'{{random("Karnataka","Maharashtra","Karnataka","Delhi")}}',
Country: '{{random("India","Japan","United States")}}',
PostalCode: function(){
var items = ["560019","560020","560021","563114","563101"];
return items[Math.floor(Math.random()*items.length)];
}
},
Email: function(){ return this.UserName.toLowerCase() + "@mail.com"; },
PhoneNumber: function(){
var rand = Math.floor(Math.random() * 2000000000 + 8000000000);
return '+91' + rand.toString();
},
LastActive: '{{date(new Date(2015,0,1), new Date(2020, 11, 31), "YYYY-MM-dd")}}',
Photo:{
Url:function(num) {
return 'https://randomuser.me/api/portraits/men/' + num.integer(1,99) + '.jpg';
}
}
}
]
Generate Users Female
[
'{{repeat(50)}}',
{
Name: '{{firstName("female")}} {{surname()}}',
UserName: function(){ return this.Name.split(" ")[0]; },
Gender: 'Female',
DateOfBirth: '{{date(new Date(1980,0,1), new Date(2000, 11, 31), "YYYY-MM-dd")}}',
BloodGroup: '{{random("Ap", "An", "Bp", "Bn", "ABp", "ABn", "Op", "On")}}',
Available:'{{random(true,false,true,false,true)}}',
Address: {
Area:'{{random("Electronic City", "Kengeri","Koramangala","Manyata Tech Park","Marathahalli","Whitefield","Indiranagar","Jayanagar")}}',
City: '{{random("Bengaluru","Mumbai","Kolar","Hydrabad")}}',
State:'{{random("Karnataka","Maharashtra","Karnataka","Delhi")}}',
Country: '{{random("India","Japan","United States")}}',
PostalCode: function(){
var items = ["560019","560020","560021","563114","563101"];
return items[Math.floor(Math.random()*items.length)];
}
},
Email: function(){ return this.UserName.toLowerCase() + "@mail.com"; },
PhoneNumber: function(){
var rand = Math.floor(Math.random() * 2000000000 + 8000000000);
return '+91' + rand.toString();
},
LastActive: '{{date(new Date(2015,0,1), new Date(2020, 11, 31), "YYYY-MM-dd")}}',
Photo:{
Url:function(num) {
return 'https://randomuser.me/api/portraits/women/' + num.integer(1,99) + '.jpg';
}
}
}
]
Generate Bank
[
'{{repeat(50)}}',
{
Name: '{{random("Nimhans Hospital","Jayadeva Institute of Cardiology","Victoria Hospital","Manipal Hospital","Apollo Hospital","M.S. Ramaiah Memorial Hospital","Fortis Hospital","Rainbow Hospital","Apollo Speciality Hospital","Columbia Asia Referral Hospital","Kokilaben Dhirubhai Ambani Hospital","Narayana Multispeciality Hospital","Nanavati Hospital","Wockhardt Hospital","MaxCure Hospital","Manipal Hospital","Victoria Hospital")}}',
PhoneNumber: function(){
var rand = Math.floor(Math.random() * 2000000000 + 8000000000);
return '+91' + rand.toString();
},
Email: function(){ return this.Name.split(" ")[0].toLowerCase() + "@mail.com"; },
BloodGroups:[
{
"Group":"Op",
"Value":function(){return Math.floor(Math.random() * 50);}
},
{
"Group":"On",
"Value":function(){return Math.floor(Math.random() * 50);}
},
{
"Group":"Ap",
"Value":function(){return Math.floor(Math.random() * 50);}
},
{
"Group":"An",
"Value":function(){return Math.floor(Math.random() * 50);}
},
{
"Group":"Bp",
"Value":function(){return Math.floor(Math.random() * 50);}
},
{
"Group":"Bn",
"Value":function(){return Math.floor(Math.random() * 50);}
},
{
"Group":"ABp",
"Value":function(){return Math.floor(Math.random() * 50);}
},
{
"Group":"ABn",
"Value":function(){return Math.floor(Math.random() * 50);}
}
],
Address: {
Area:'{{random("Electronic City", "Kengeri","Koramangala","Manyata Tech Park","Marathahalli","Whitefield","Indiranagar","Jayanagar")}}',
City: '{{random("Bengaluru","Mumbai","Kolar","Hydrabad")}}',
State:'{{random("Karnataka","Maharashtra","Karnataka","Delhi")}}',
Country: '{{random("India","Japan","United States")}}',
PostalCode: function(){
var items = ["560019","560020","560021","563114","563101"];
return items[Math.floor(Math.random()*items.length)];
}
},
LastUpdated: '{{date(new Date(2020,0,1), new Date(2020, 12, 30), "YYYY-MM-dd")}}',
Moderators:[
{
User:{
UserName:'{{random("bob","lynn","dora")}}'
}
}],
Website:function(){ return "https://www." +this.Name.split(" ")[0].toLowerCase() + ".com"; },
Photo:{
Url:'{{random("https://image.freepik.com/free-vector/medical-service-logos-vector-set_53876-62795.jpg","https://image.freepik.com/free-vector/heart-care-logo_1032-146.jpg","https://image.freepik.com/free-vector/donate-blood-isolated-logo_1025-350.jpg","https://image.freepik.com/free-vector/give-blood-background_1057-1029.jpg","https://image.freepik.com/free-vector/give-blood-background_1057-1029.jpg","https://image.freepik.com/free-photo/blood-drop-paper-medical-cross-health-diy-element_53876-128924.jpg","https://image.freepik.com/free-psd/blood-donation-flyer-template-design_23-2149087897.jpg")}}'
}
}
]