fake json generator code example
Example 1: json dummy data
fetch('https://jsonplaceholder.typicode.com/todos')
.then(response => response.json())
.then(json => console.log(json))
Example 2: generating test data in api
For API Part: I use "https://www.mockaroo.com/" ==>
generates multiple format (CSV, JSON, XML, etc)
Example 3: fake json generator
{
"requestCount": "number",
"requests": { "requsetId": "string",
"icon": "string",
"service": {"id": "string","nameAr": "string","nameEn": "string"
},
"requestor": {"id": "string","nameAr": "string","nameEn": "string"
}
,
"requestDate": "date","step": "string", "summary": "string", "isRead": "boolean",
"stepOwner": {"id": "string","nameAr": "string","nameEn": "string","position": "string"
},
"d": 0,
"resultStatus": 0,
"actions": [{"id": "string","nameEn": "string","nameAr": "string",
"actionUrl": "string","isMainAction": "boolean","isQuickAction": "boolean"
}],
"stepHistory": [{"step": "string",
"stepOwner": {"id": "string","nameAr": "string","nameEn": "string","position": "string"
},
"actionDate": "date","note": "string",
"actions": { "id": "string","nameEn": "string","nameAr": "string"}
}]
}
}