|
| JsonDecoder (Schema schema, Stream stream) |
| Initializes a new instance of the JsonDecoder class.
|
|
| JsonDecoder (Schema schema, string str) |
| Initializes a new instance of the JsonDecoder class.
|
|
void | Configure (Stream stream) |
| Reconfigures this JsonDecoder to use the InputStream provided. Otherwise, this JsonDecoder will reset its state and then reconfigure its input.
|
|
void | Configure (string str) |
| Reconfigures this JsonDecoder to use the String provided for input. Otherwise, this JsonDecoder will reset its state and then reconfigure its input.
|
|
override void | ReadNull () |
| Reads a null Avro type.
|
|
override bool | ReadBoolean () |
| Read a boolean Avro type.- Returns
- The boolean just read
|
|
override int | ReadInt () |
| Reads an int Avro type.- Returns
- The int just read
|
|
override long | ReadLong () |
| Reads a long Avro type.- Returns
- The long just read
|
|
override float | ReadFloat () |
| Reads a float Avro type.- Returns
- The float just read
|
|
override double | ReadDouble () |
| Reads a double Avro type.- Returns
- The double just read
|
|
override string | ReadString () |
| Reads a string Avro type.- Returns
- The string just read
|
|
override void | SkipString () |
| Skips a string Avro type on the stream.
|
|
override byte[] | ReadBytes () |
| Reads the bytes Avro type.- Returns
- The bytes just read
|
|
override void | SkipBytes () |
| Skips a bytes Avro type on the stream.
|
|
override void | ReadFixed (byte[] bytes) |
| A convenience method for ReadFixed(buffer, 0, buffer.Length);.- Parameters
-
buffer | The buffer to read into. |
|
|
override void | ReadFixed (byte[] bytes, int start, int len) |
| Read a Fixed Avro type of length.- Parameters
-
buffer | Buffer to read into |
start | Starting position of buffer to read into |
length | Number of bytes to read |
|
|
override void | SkipFixed (int length) |
| Skips a fixed of a specified length.- Parameters
-
|
|
override int | ReadEnum () |
| Reads an enum AvroType.- Returns
- The enum just read
|
|
override long | ReadArrayStart () |
| Starts reading the array Avro type. This, together with ReadArrayNext() is used to read the items from Avro array. This returns the number of entries in the initial chunk. After consuming the chunk, the client should call ReadArrayNext() to get the number of entries in the next chunk. The client should repeat the procedure until there are no more entries in the array.for (int n = decoder.ReadArrayStart(); n > 0; n = decoder.ReadArrayNext()) { // Read one array entry. }- Returns
- The number of entries in the initial chunk, 0 if the array is empty.
|
|
override long | ReadArrayNext () |
| See ReadArrayStart().- Returns
- The number of array entries in the next chunk, 0 if there are no more entries.
|
|
override void | SkipArray () |
|
override long | ReadMapStart () |
| Starts reading the map Avro type. This, together with ReadMapNext() is used to read the entries from Avro map. This returns the number of entries in the initial chunk. After consuming the chunk, the client should call ReadMapNext() to get the number of entries in the next chunk. The client should repeat the procedure until there are no more entries in the array. for (int n = decoder.ReadMapStart(); n > 0; n = decoder.ReadMapNext()) { // Read one map entry. }.- Returns
- The number of entries in the initial chunk, 0 if the map is empty.
|
|
override long | ReadMapNext () |
| See ReadMapStart().- Returns
- The number of map entries in the next chunk, 0 if there are no more entries.
|
|
override void | SkipMap () |
|
override int | ReadUnionIndex () |
| Reads the index, which determines the type in an union Avro type.- Returns
- The index of the type within the union.
|
|
override void | SkipNull () |
| Skips a null Avro type on the stream.
|
|
override void | SkipBoolean () |
| Skips a boolean Avro type on the stream.
|
|
override void | SkipInt () |
| Skips a int Avro type on the stream.
|
|
override void | SkipLong () |
| Skips a long Avro type on the stream.
|
|
override void | SkipFloat () |
| Skips a float Avro type on the stream.
|
|
override void | SkipDouble () |
| Skips a double Avro type on the stream.
|
|
override void | SkipEnum () |
| Skips an enumeration.
|
|
override void | SkipUnionIndex () |
| Skips a union tag index.
|
|
override Symbol | DoAction (Symbol input, Symbol top) |
| Handle the action symbol top when the input is sought to be taken off the stack.- Parameters
-
input | The input symbol from the caller of Advance |
top | The symbol at the top the stack. |
- Returns
null if Advance() is to continue processing the stack. If not null the return value will be returned by Advance().
|
|
void | ReadNull () |
| Reads a null Avro type.
|
|
bool | ReadBoolean () |
| Read a boolean Avro type.- Returns
- The boolean just read
|
|
int | ReadInt () |
| Reads an int Avro type.- Returns
- The int just read
|
|
long | ReadLong () |
| Reads a long Avro type.- Returns
- The long just read
|
|
float | ReadFloat () |
| Reads a float Avro type.- Returns
- The float just read
|
|
double | ReadDouble () |
| Reads a double Avro type.- Returns
- The double just read
|
|
byte[] | ReadBytes () |
| Reads the bytes Avro type.- Returns
- The bytes just read
|
|
string | ReadString () |
| Reads a string Avro type.- Returns
- The string just read
|
|
int | ReadEnum () |
| Reads an enum AvroType.- Returns
- The enum just read
|
|
long | ReadArrayStart () |
| Starts reading the array Avro type. This, together with ReadArrayNext() is used to read the items from Avro array. This returns the number of entries in the initial chunk. After consuming the chunk, the client should call ReadArrayNext() to get the number of entries in the next chunk. The client should repeat the procedure until there are no more entries in the array.for (int n = decoder.ReadArrayStart(); n > 0; n = decoder.ReadArrayNext()) { // Read one array entry. }- Returns
- The number of entries in the initial chunk, 0 if the array is empty.
|
|
long | ReadArrayNext () |
| See ReadArrayStart().- Returns
- The number of array entries in the next chunk, 0 if there are no more entries.
|
|
long | ReadMapStart () |
| Starts reading the map Avro type. This, together with ReadMapNext() is used to read the entries from Avro map. This returns the number of entries in the initial chunk. After consuming the chunk, the client should call ReadMapNext() to get the number of entries in the next chunk. The client should repeat the procedure until there are no more entries in the array. for (int n = decoder.ReadMapStart(); n > 0; n = decoder.ReadMapNext()) { // Read one map entry. }.- Returns
- The number of entries in the initial chunk, 0 if the map is empty.
|
|
long | ReadMapNext () |
| See ReadMapStart().- Returns
- The number of map entries in the next chunk, 0 if there are no more entries.
|
|
int | ReadUnionIndex () |
| Reads the index, which determines the type in an union Avro type.- Returns
- The index of the type within the union.
|
|
void | ReadFixed (byte[] buffer) |
| A convenience method for ReadFixed(buffer, 0, buffer.Length);.- Parameters
-
buffer | The buffer to read into. |
|
|
void | ReadFixed (byte[] buffer, int start, int length) |
| Read a Fixed Avro type of length.- Parameters
-
buffer | Buffer to read into |
start | Starting position of buffer to read into |
length | Number of bytes to read |
|
|
void | SkipNull () |
| Skips a null Avro type on the stream.
|
|
void | SkipBoolean () |
| Skips a boolean Avro type on the stream.
|
|
void | SkipInt () |
| Skips a int Avro type on the stream.
|
|
void | SkipLong () |
| Skips a long Avro type on the stream.
|
|
void | SkipFloat () |
| Skips a float Avro type on the stream.
|
|
void | SkipDouble () |
| Skips a double Avro type on the stream.
|
|
void | SkipBytes () |
| Skips a bytes Avro type on the stream.
|
|
void | SkipString () |
| Skips a string Avro type on the stream.
|
|
void | SkipEnum () |
| Skips an enumeration.
|
|
void | SkipUnionIndex () |
| Skips a union tag index.
|
|
void | SkipFixed (int len) |
| Skips a fixed of a specified length.- Parameters
-
|
|
void | SkipArray () |
| Skips an array on the stream.
|
|
void | SkipMap () |
| Skips a map on the stream.
|
|
Symbol | DoAction (Symbol input, Symbol top) |
| Handle the action symbol top when the input is sought to be taken off the stack.- Parameters
-
input | The input symbol from the caller of Advance |
top | The symbol at the top the stack. |
- Returns
null if Advance() is to continue processing the stack. If not null the return value will be returned by Advance().
|
|
virtual void | SkipAction () |
| Skips the action at the top of the stack.
|
|
virtual void | SkipTopSymbol () |
| Skips the symbol at the top of the stack.
|
|
A Decoder for Avro's JSON data encoding.
JsonDecoder is not thread-safe.