From ed94d0dd30831810eeb8c28523d08934c521ae00 Mon Sep 17 00:00:00 2001 From: William Quast Date: Tue, 29 May 2012 18:59:31 -0500 Subject: [PATCH 1/2] Make PluginResult return valid JSON so the JS side can use JSON.parse --- framework/src/org/apache/cordova/api/PluginResult.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/org/apache/cordova/api/PluginResult.java b/framework/src/org/apache/cordova/api/PluginResult.java index c3ef6d6a..73efab9a 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) { From 508cafad1da34b984e8e601abe37f2cf49b1f7d4 Mon Sep 17 00:00:00 2001 From: macdonst Date: Sat, 2 Jun 2012 11:12:12 -0400 Subject: [PATCH 2/2] Change 'websites' to 'urls' --- framework/src/org/apache/cordova/ContactAccessorSdk5.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/org/apache/cordova/ContactAccessorSdk5.java b/framework/src/org/apache/cordova/ContactAccessorSdk5.java index 9e672e93..02047e8c 100644 --- a/framework/src/org/apache/cordova/ContactAccessorSdk5.java +++ b/framework/src/org/apache/cordova/ContactAccessorSdk5.java @@ -1166,7 +1166,7 @@ public class ContactAccessorSdk5 extends ContactAccessor { // Modify urls JSONArray websites = null; try { - websites = contact.getJSONArray("websites"); + websites = contact.getJSONArray("urls"); if (websites != null) { for (int i=0; i