Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var parser = new UnmanagedJsonParser(state);
- while(true)
- {
- if(parser.Read() == false)
- {
- var read = stream.Read(buffer, 0, buffer.Length);
- if (read == 0)
- throw new EndOfStreamException();
- parser.SetBuffer(buffer, 0, read);
- continue;
- }
- if(state.CurrentTokenType != JsonParserToken.String)
- throw new InvalidStateException();
- // do something with the string
- }
Add Comment
Please, Sign In to add comment