src/main/java/convex/java/JSON.java
/**
     * Converts a string to JSON.
     * 
     * @param jsonString A string containing a valid JSON Object representation
     * @return A map representing the JSON object
     * @throws Error In case of JSON parsing error
     */
Converts a string to JSON.

@param jsonString A string containing a valid JSON Object representation
@return A map representing the JSON object
@throws Error In case of JSON parsing error
Converts a string to JSON . @param jsonString A string containing a valid JSON Object representation @return A map representing the JSON object @throws Error In case of JSON parsing error
@SuppressWarnings("unchecked")
    public static Map<String, Object> toMap(String jsonString) {
        JSONParser parser = new JSONParser();
        try {
            JSONObject result = (JSONObject) parser.parse(jsonString);
            return new JSONObject(result);
        } catch (ParseException e) {
            throw new Error("Error in JSON parsing: " + e.getMessage(), e);
        }
    }
@ SuppressWarnings ( "unchecked" ) public static Map < String , Object > toMap ( String jsonString ) { JSONParser parser = new JSONParser ( ) ; try { JSONObject result = ( JSONObject ) parser . parse ( jsonString ) ; return new JSONObject ( result ) ; } catch ( ParseException e ) { throw new Error ( "Error in JSON parsing: " + e . getMessage ( ) , e ) ; } }
Converts a string to JSON.
Converts a string to JSON .