read method

dynamic read()

Reads the next value.

Implementation

@pragma('vm:prefer-inline')
dynamic read() {
  _skipWhitespace();
  switch (buffer[_offset]) {
    case tokenDoubleQuote:
      return _readString();
    case tokenT:
      _offset += 4;
      return true;
    case tokenF:
      _offset += 5;
      return false;
    case tokenN:
      _offset += 4;
      return null;
    case tokenLBracket:
      return readArray();
    case tokenLBrace:
      return readObject();
    default:
      return _readNum();
  }
}