Skip to content

Commit c2b3f2b

Browse files
author
John J. Aylward
committed
adds back in the XML.stringToValue method, but deprecates it.
1 parent 3007fc8 commit c2b3f2b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

XML.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,18 @@ private static boolean parse(XMLTokener x, JSONObject context, String name)
295295
}
296296
}
297297
}
298+
299+
/**
300+
* This method has been deprecated in favor of the
301+
* {@link JSONObject.stringToValue(String)} method. Use it instead.
302+
*
303+
* @deprecated Use {@link JSONObject#stringToValue(String)} instead.
304+
* @param string
305+
* @return JSON value of this string or the string
306+
*/
307+
public static Object stringToValue(String string) {
308+
return JSONObject.stringToValue(string);
309+
}
298310

299311
/**
300312
* Convert a well-formed (but not necessarily valid) XML string into a

0 commit comments

Comments
 (0)