Success/Error Design Pattern For Ajax

‘Success/Error’ design pattern for Ajax requests is a JSON encoded string in a specific format – each response has a minimum of two elements in it – ie ‘success’ and ‘error’ – like this…

{
"success":"Task done successfully",
"error":false
}

OR

{
"success":false,
"error":"Database Connection Error!"
}

This method is used extensivly in Nexty. Almost all Ajax response in Nexty ares in this format.

Since this is in the JavaScript domain, I thougt it might be better to pubish the details in my OpenJS site. Read more about Success/Error Design Pattern For Ajax.