[Opensrf-commits] r1526 - trunk/src/javascript
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Dec 8 19:46:53 EST 2008
Author: erickson
Date: 2008-12-08 19:46:52 -0500 (Mon, 08 Dec 2008)
New Revision: 1526
Modified:
trunk/src/javascript/JSON_v1.js
Log:
add support for encoding boolean types to JSON
Modified: trunk/src/javascript/JSON_v1.js
===================================================================
--- trunk/src/javascript/JSON_v1.js 2008-12-07 21:04:50 UTC (rev 1525)
+++ trunk/src/javascript/JSON_v1.js 2008-12-09 00:46:52 UTC (rev 1526)
@@ -173,6 +173,9 @@
s = s.replace(/\f/g, "\\f");
return '"' + s + '"';
+ case 'boolean':
+ return (arg) ? 'true' : 'false';
+
default: return 'null';
}
}
More information about the opensrf-commits
mailing list