public final class StajParser extends java.lang.Object implements java.util.Iterator<JsonStreamElement>
Iterator
of JsonStreamElement
s.Constructor and Description |
---|
StajParser(java.io.Reader in)
Constructs a StajParser reading from the specified
Reader . |
StajParser(java.lang.String json)
Constructs a StajParser reading from the given
String . |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Determines whether there are any more elements.
|
JsonStreamElement |
next()
Gets the next element in the stream.
|
void |
remove()
Not supported.
|
public StajParser(java.io.Reader in)
Reader
.in
- the Reader
to convert into JsonStreamElement
s.public StajParser(java.lang.String json)
String
.json
- the String
to convert into JsonStreamElement
s.public boolean hasNext()
hasNext
in interface java.util.Iterator<JsonStreamElement>
InvalidSyntaxRuntimeException
- if the next element could not be read, for example if the next element turns out not to be valid JSONJsonStreamException
- if the underlying character stream failed.public JsonStreamElement next()
next
in interface java.util.Iterator<JsonStreamElement>
InvalidSyntaxRuntimeException
- if the next element could not be read, for example if the next element turns out not to be valid JSONJsonStreamException
- if the underlying character stream failed.java.util.NoSuchElementException
- if there are no more elements to read.public void remove()
remove
in interface java.util.Iterator<JsonStreamElement>