Package ej.rest.util

Class Tool


  • public class Tool
    extends Object
    • Constructor Detail

      • Tool

        public Tool()
    • Method Detail

      • stringToValue

        public static Object stringToValue​(String s)
        Try to convert a string into a number, boolean, or null. If the string can't be converted, return the string.
        Parameters:
        s - A String.
        Returns:
        A simple JSON value.
      • noSpace

        public static void noSpace​(String string)
                            throws JSONException
        Throw an exception if the string contains whitespace. Whitespace is not allowed in tagNames and attributes.
        Parameters:
        string -
        Throws:
        JSONException