@capacitor/android 5.2.4-nightly-20230822T150500.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -302,14 +302,18 @@ public class HttpRequestHandler {
302
302
  if ("null".equals(input.trim())) {
303
303
  return JSONObject.NULL;
304
304
  } else if ("true".equals(input.trim())) {
305
- return new JSONObject().put("flag", "true");
305
+ return true;
306
306
  } else if ("false".equals(input.trim())) {
307
- return new JSONObject().put("flag", "false");
307
+ return false;
308
308
  } else if (input.trim().length() <= 0) {
309
309
  return "";
310
310
  } else if (input.trim().matches("^\".*\"$")) {
311
311
  // a string enclosed in " " is a json value, return the string without the quotes
312
312
  return input.trim().substring(1, input.trim().length() - 1);
313
+ } else if (input.trim().matches("^-?\\d+$")) {
314
+ return Integer.parseInt(input.trim());
315
+ } else if (input.trim().matches("^-?\\d+(\\.\\d+)?$")) {
316
+ return Double.parseDouble(input.trim());
313
317
  } else {
314
318
  try {
315
319
  return new JSObject(input);
@@ -318,7 +322,7 @@ public class HttpRequestHandler {
318
322
  }
319
323
  }
320
324
  } catch (JSONException e) {
321
- return new JSArray(input);
325
+ return input;
322
326
  }
323
327
  }
324
328
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/android",
3
- "version": "5.2.4-nightly-20230822T150500.0",
3
+ "version": "5.3.0",
4
4
  "description": "Capacitor: Cross-platform apps with JavaScript and the web",
5
5
  "homepage": "https://capacitorjs.com",
6
6
  "author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
@@ -23,7 +23,7 @@
23
23
  "verify": "./gradlew clean lint build test -b capacitor/build.gradle"
24
24
  },
25
25
  "peerDependencies": {
26
- "@capacitor/core": "^5.2.0-nightly-20230822T150500.0"
26
+ "@capacitor/core": "^5.3.0"
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"