readJSSet method

  1. @override
VoltronArray readJSSet()
override

Implementation

@override
VoltronArray readJSSet() {
  var array = VoltronArray();
  assignId(array);
  int tag;
  var read = 0;
  while ((tag = readTag()) != SerializationTag.kEndJsSet) {
    read++;
    var value = readValue(tag: tag, location: StringLocation.setItem);
    array.push(value);
  }
  var expected = reader.getVarint();
  if (read != expected) {
    throw UnsupportedError("unexpected number of values");
  }
  return array;
}