Class GSONDataTypeConverter
java.lang.Object
org.apache.synapse.commons.json.jsonprocessor.utils.GSONDataTypeConverter
This class provides functionality to convert between GSON data structures.
-
Method Summary
Modifier and TypeMethodDescriptiongetMapFromJsonArray(com.google.gson.JsonArray array) Given a json array, this method will return the mapgetMapFromString(String input) Given a string contains a json array, this method will return the Map.
-
Method Details
-
getMapFromString
Given a string contains a json array, this method will return the Map. This is where the single element array correction happens.- Parameters:
input- JsonArray as a string.- Returns:
- map entry of json array.
-
getMapFromJsonArray
public static Map.Entry<String,com.google.gson.JsonElement> getMapFromJsonArray(com.google.gson.JsonArray array) Given a json array, this method will return the map- Parameters:
array- input array.- Returns:
- map entry of json array
-