Class JsonUtil

  • All Implemented Interfaces:

    
    public final class JsonUtil
    
                        

    The class JsonUtil provides helper functions to generate Json.

    Since:

    3.0

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonUtil()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static String toJsonArray(Array<String> array) Converts the specified array to a json-like array string.
      static String toJsonObject(Map<String, String> map) Converts the specified map to a json-like object string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JsonUtil

        JsonUtil()
    • Method Detail

      • toJsonArray

         static String toJsonArray(Array<String> array)

        Converts the specified array to a json-like array string.

        Parameters:
        array - the array
        Returns:

        the json string

      • toJsonObject

         static String toJsonObject(Map<String, String> map)

        Converts the specified map to a json-like object string.

        Parameters:
        map - the map
        Returns:

        the string