public enum JsonParserType extends Enum<JsonParserType>
             parser = new JsonSlurper().setType(JsonParserType.INDEX_OVERLAY);
 Parser speed in order: INDEX_OVERLAY, LAX, CHAR_BUFFER, CHARACTER_SOURCE.
Use Cases:Use LAX for config files as it allows comments. Use INDEX_OVERLAY for REST calls, WebSocket messages, AJAX, inter process communication, etc. Use CHAR_BUFFER if eager parsing of ints, dates, longs, are appealing. Use CHARACTER_SOURCE if you are dealing with large JSON files over 2MB. INDEX_OVERLAY is highly tuned for object deserialization from JSON.
| Enum Constant and Description | 
|---|
| CHAR_BUFFERThis is a basic parser with no index overlay. | 
| CHARACTER_SOURCEParser uses an abstraction that allows it to handle any size file by using a char [] windowing,
 built on top or Reader. | 
| INDEX_OVERLAYFastest parser, but has pointers (indexes really) to original char buffer. | 
| LAXLAX mode allows keys with no quotes, keys with single quotes,
 strings elements in JSON with no quotes or single quotes. | 
| Modifier and Type | Method and Description | 
|---|---|
| static JsonParserType | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static JsonParserType[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final JsonParserType INDEX_OVERLAY
public static final JsonParserType CHARACTER_SOURCE
public static final JsonParserType LAX
public static final JsonParserType CHAR_BUFFER
public static JsonParserType[] values()
for (JsonParserType c : JsonParserType.values()) System.out.println(c);
public static JsonParserType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null