How to send JSON Error response
How to send JSON Error response

In case of a Exception i am currently returning the following JSON:
{"error":"an error ocurred"}
But somehow this is not a valid JSON for Datatable Editor. Can someone provide me with a valid error JSON response?
Does it have to be like this?:
{
"error": [
{
"message":"an error ocurred"
}
]
}
stay tuned and thank you guys
This discussion has been closed.
Answers
No - that should be perfectly valid. Can you give me a link to your page showing the issue please?
Allan