add support for encoding boolean types to JSON
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 9 Dec 2008 00:46:52 +0000 (00:46 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 9 Dec 2008 00:46:52 +0000 (00:46 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1526 9efc2488-bf62-4759-914b-345cdb29e865

src/javascript/JSON_v1.js

index 7be5639..4ba09f0 100644 (file)
@@ -173,6 +173,9 @@ function js2JSONRaw(arg) {
                        s = s.replace(/\f/g, "\\f");
                        return '"' + s + '"';
 
+        case 'boolean':
+            return (arg) ? 'true' : 'false';
+
                default: return 'null';
        }
 }