Skip to content

Commit

Permalink
adds back in the XML.stringToValue method, but deprecates it.
Browse files Browse the repository at this point in the history
  • Loading branch information
John J. Aylward committed Jan 27, 2016
1 parent 3007fc8 commit c2b3f2b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions XML.java
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,18 @@ private static boolean parse(XMLTokener x, JSONObject context, String name)
}
}
}

/**
* This method has been deprecated in favor of the
* {@link JSONObject.stringToValue(String)} method. Use it instead.
*
* @deprecated Use {@link JSONObject#stringToValue(String)} instead.
* @param string
* @return JSON value of this string or the string
*/
public static Object stringToValue(String string) {
return JSONObject.stringToValue(string);
}

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

0 comments on commit c2b3f2b

Please sign in to comment.