You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2012/06/05 00:20:29 UTC

[8/8] android commit: Make PluginResult return valid JSON so the JS side can use JSON.parse

Make PluginResult return valid JSON so the JS side can use JSON.parse


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/ed94d0dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/ed94d0dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/ed94d0dd

Branch: refs/heads/CordovaWebView
Commit: ed94d0dd30831810eeb8c28523d08934c521ae00
Parents: ccd4365
Author: William Quast <wi...@bohemian.cc>
Authored: Tue May 29 18:59:31 2012 -0500
Committer: William Quast <wi...@bohemian.cc>
Committed: Tue May 29 18:59:31 2012 -0500

----------------------------------------------------------------------
 .../src/org/apache/cordova/api/PluginResult.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/ed94d0dd/framework/src/org/apache/cordova/api/PluginResult.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/api/PluginResult.java b/framework/src/org/apache/cordova/api/PluginResult.java
index c3ef6d6..73efab9 100755
--- a/framework/src/org/apache/cordova/api/PluginResult.java
+++ b/framework/src/org/apache/cordova/api/PluginResult.java
@@ -80,7 +80,7 @@ public class PluginResult {
 	}
 	
 	public String getJSONString() {
-		return "{status:" + this.status + ",message:" + this.message + ",keepCallback:" + this.keepCallback + "}";
+		return "{\"status\":" + this.status + ",\"message\":" + this.message + ",\"keepCallback\":" + this.keepCallback + "}";
 	}
 	
 	public String toSuccessCallbackString(String callbackId) {