From: erickson Date: Tue, 9 Dec 2008 00:46:52 +0000 (+0000) Subject: add support for encoding boolean types to JSON X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ea7515dba77fba704a9e0dc939400343e2ef20f6;p=opensrf%2Fbjwebb.git add support for encoding boolean types to JSON git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1526 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/javascript/JSON_v1.js b/src/javascript/JSON_v1.js index 7be5639..4ba09f0 100644 --- a/src/javascript/JSON_v1.js +++ b/src/javascript/JSON_v1.js @@ -173,6 +173,9 @@ function js2JSONRaw(arg) { s = s.replace(/\f/g, "\\f"); return '"' + s + '"'; + case 'boolean': + return (arg) ? 'true' : 'false'; + default: return 'null'; } }