JSFiddle - React, Tailwind, and code Playground
by sberube
HTML
<div id="test">
{
"app": {
"name": "Common Cloud User Experience",
"version": "0.0.1"
},
"logout": {
"title": "Log Out",
"closeWindow": "Close Window",
"youAreOut": "You Are Now Logged Out.",
"inactivity": "Your session has ended due to inactivity.",
"footer": "If you believe you have reached this page because of an error please contact your administrator."
},
"approvals": {
"confirmation": {
"approve": {
"title": "Approve this request?",
"subtitle": "Approving this request will start the fulfillment process and generate a service subscription."
},
"deny": {
"title": "Deny this request?",
"subtitle": "Enter an explanation for why you denied this request. Important: Once you click 'Yes', you cannot edit the message. This message will be visible to anyone who views this request.",
"placeholder": "Reason for rejecting",
"error": "A reason for rejecting is required."
}
},
"denyConfirmation": {
"title": "Deny this request?",
"subtitle": "Enter an explanation for why you denied this request. Important: Once you click OK, you cannot edit the message. This message will be visible to anyone who views this request."
},
"states": {
"ALL": "All",
"DECISION_PENDING": "Pending",
"APPROVED": "Approved",
"REJECTED": "Rejected"
},
"detail": {
"title": "Review Request Details",
"description": "A summary of the checkout and cofiguration information you provide at the time of the request.",
"checkout": {
"title": "Checkout Details",
"name": "Subscription Name",
"description": "Subscription Description",
"groupOwner": "Group Ownership",
"groupName": "Group Name",
"term": "Subscription Term",
"attachment": "Attached Documents",
"cost": "Costs Breakdown",
"costDescription": "Configuration selections and their price...
JavaScript
try {
var json = JSON.parse($('#test').text());
} catch (e) {
asdads;
window.alert(e);
}