SLING-7041 - Use JSON parsing in Sling.evalString

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1804546 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/resources/system/sling.js b/src/main/resources/system/sling.js
index 28b884d..c96587c 100644
--- a/src/main/resources/system/sling.js
+++ b/src/main/resources/system/sling.js
@@ -194,15 +194,7 @@
     
     /** eval str, accepting various object delimiters */
     Sling.evalString = function(str) {
-        var obj = null;
-        if(str.indexOf('[')==0) {
-            eval("obj="+str);
-        } else if(str.indexOf('{')==0) {
-            eval("obj="+str);
-        } else {
-            eval("obj={"+str+"}");
-        }
-        return obj;
+    	return JSON.parse(str);
     }
      
     /** Get "session info" from repository. Mainly answers the question: "Who am I"