From 86aef5f006204dc27c5b2f858f33be89e5c28e15 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 24 Feb 2005 21:26:51 +0000 Subject: [PATCH] casting git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@114 9efc2488-bf62-4759-914b-345cdb29e865 --- src/javascript/JSON.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/javascript/JSON.js b/src/javascript/JSON.js index 3cee963..9145267 100644 --- a/src/javascript/JSON.js +++ b/src/javascript/JSON.js @@ -22,8 +22,8 @@ function Cast (obj, class_constructor) { } function JSON2js (json) { - json = json.replace( /\/\*--\s*S\w*?\s*?\s+\w+\s*--\*\//g, 'Cast('); - json = json.replace( /\/\*--\s*E\w*?\s*?\s+(\w+)\s*--\*\//g, ', "$1")'); + json = String(json).replace( /\/\*--\s*S\w*?\s*?\s+\w+\s*--\*\//g, 'Cast('); + json = String(json).replace( /\/\*--\s*E\w*?\s*?\s+(\w+)\s*--\*\//g, ', "$1")'); var obj; if (json != '') { eval( 'obj = ' + json ); -- 2.11.0