java.lang.Object
org.apache.drill.exec.store.easy.json.parser.AbstractElementParser
org.apache.drill.exec.store.easy.json.parser.ArrayParser
All Implemented Interfaces:
ElementParser

public class ArrayParser extends AbstractElementParser
Parses a JSON array, which consists of a list of elements, represented by a ValueListener. There is a single listener for all the elements, which are presumed to be of the same type.

The element is created when first encountered, either as part of field creation ({a: [10]}) or when later encountered in parsing (<code{a: []} {a: [10]}).

This parser does not attempt to parse an array as a poor-man's tuple: [ 101, "fred", 23.45 ]. The listener could handle this case. But, if we need to handle such a case, it would be better to create a new parser for that case, with an element listener per element as is done for objects.