code: public static JSONFunction parse( String str ) {
        if( !JSONUtils.isFunction( str ) ) {
           throw new JSONException( "String is not a function. " + str );
        } else {
           String params = JSONUtils.getFunctionParams( str );
           String text = JSONUtils.getFunctionBody( str );
           return new JSONFunction( (params != null) ? StringUtils.split( params, "," ) : null, text != null ? text : "" );
        }
     }
docs: Constructs a JSONFunction from a text representation