deserializeBool method

bool deserializeBool()

Implementation

bool deserializeBool() {
  int bool = read(1)[0];
  if (bool != 1 && bool != 0) {
    throw ArgumentError("Invalid boolean value");
  }
  return bool == 1;
}