Function Decoder.skipMap

Support for quickly skipping through a map similar to [skipArray].

abstract ulong skipMap() @safe;

As an example, let's say you want to skip a map of records, the record consisting of an Long field and a Boolean field. Your code would look something like this:

for (long i = in.skipMap(); i != 0; i = in.skipMap()) {
  for (long j = 0; j < i; j++) {
    in.skipString(); // Discard key
    in.readInt(); // Discard int-field of value
    in.readBoolean(); // Discard boolean-field of value
  }
}

Throws

AvroTypeException If this is a stateful reader and array is not the type of the next value to be read