Jamie Lokier wrote:
Anthony Liguori wrote:
Okay, let's get more clever then and do:
#define QERR_DEV_NFOUND "{ 'code': 404, 'name': %s}"
By the way, since you've already invented a non-standard JSON
extension, which is the single quotes, why not go a step further and
permit the quotes to be omitted for simple tokens?
#define QERR_DEV_NFOUND "{ code: 404, name: %s}"
Much neater, IMHO.
Javascript has keywords (like true, false, and null) that could lead to
confusion using such a syntax.
--
Regards,
Anthony Liguori