incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macdo...@apache.org
Subject [2/2] android commit: Make PluginResult return valid JSON so the JS side can use JSON.parse
Date Sat, 02 Jun 2012 20:03:24 GMT
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/master
Commit: ed94d0dd30831810eeb8c28523d08934c521ae00
Parents: ccd4365
Author: William Quast <will@bohemian.cc>
Authored: Tue May 29 18:59:31 2012 -0500
Committer: William Quast <will@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) {


Mime
View raw message