public static Map jsonToMaps(String json, Map<String, Object> optionalArgs) {
    """
	Map args = ["USE_MAPS": true]
	Use JsonReader.jsonToJava(String json, args)
	Note that the return type will match the JSON type (array, object, string, long, boolean, or null).
	No longer recommended: Use jsonToJava with USE_MAPS:true
	@param json String of JSON content
	@param optionalArgs Map of optional arguments to control customization.  See readme file for
	details on these options.
	@return Map where each Map representa an object in the JSON input.
    """
        try
        {
            if (optionalArgs == null)
            {
                optionalArgs = new HashMap<String, Object>();
            }
            optionalArgs.put(USE_MAPS, true);
            ByteArrayInputStream ba = new ByteArrayInputStream(json.getBytes("UTF-8"));
            JsonReader jr = new JsonReader(ba, optionalArgs);
            Object ret = jr.readObject();
            jr.close();

            return adjustOutputMap(ret);
        }
        catch (UnsupportedEncodingException e)
        {
            throw new JsonIoException("Could not convert JSON to Maps because your JVM does not support UTF-8", e);
        }
    }
public static Map jsonToMaps(String json, Map<String, Object> optionalArgs)
    {
        try
        {
            if (optionalArgs == null)
            {
                optionalArgs = new HashMap<String, Object>();
            }
            optionalArgs.put(USE_MAPS, true);
            ByteArrayInputStream ba = new ByteArrayInputStream(json.getBytes("UTF-8"));
            JsonReader jr = new JsonReader(ba, optionalArgs);
            Object ret = jr.readObject();
            jr.close();

            return adjustOutputMap(ret);
        }
        catch (UnsupportedEncodingException e)
        {
            throw new JsonIoException("Could not convert JSON to Maps because your JVM does not support UTF-8", e);
        }
    }
public static Map jsonToMaps ( String json , Map < String , Object > optionalArgs ) { try { if ( optionalArgs == null ) { optionalArgs = new HashMap < String , Object > ( ) ; } optionalArgs . put ( USE_MAPS , true ) ; ByteArrayInputStream ba = new ByteArrayInputStream ( json . getBytes ( "UTF-8" ) ) ; JsonReader jr = new JsonReader ( ba , optionalArgs ) ; Object ret = jr . readObject ( ) ; jr . close ( ) ; return adjustOutputMap ( ret ) ; } catch ( UnsupportedEncodingException e ) { throw new JsonIoException ( "Could not convert JSON to Maps because your JVM does not support UTF-8" , e ) ; } }
Map args = ["USE_MAPS": true]
Use JsonReader.jsonToJava(String json, args)
Note that the return type will match the JSON type (array, object, string, long, boolean, or null).
No longer recommended: Use jsonToJava with USE_MAPS:true
@param json String of JSON content
@param optionalArgs Map of optional arguments to control customization.  See readme file for
details on these options.
@return Map where each Map representa an object in the JSON input.
Map args = [ USE_MAPS : true ] Use JsonReader . jsonToJava ( String json args ) Note that the return type will match the JSON type ( array object string long boolean or null ) . No longer recommended : Use jsonToJava with USE_MAPS : true