Package org.apache.avro.io.parsing
Class ResolvingGrammarGenerator
java.lang.Object
org.apache.avro.io.parsing.ValidatingGrammarGenerator
org.apache.avro.io.parsing.ResolvingGrammarGenerator
The class that generates a resolving grammar to resolve between two schemas.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Encodes the given Json node n on to the encoder e according to the schema s.final Symbol
Resolves the writer schema writer and the reader schema reader and returns the start symbol for the grammar generated.Methods inherited from class org.apache.avro.io.parsing.ValidatingGrammarGenerator
generate, generate
-
Constructor Details
-
ResolvingGrammarGenerator
public ResolvingGrammarGenerator()
-
-
Method Details
-
generate
Resolves the writer schema writer and the reader schema reader and returns the start symbol for the grammar generated.- Parameters:
writer
- The schema used by the writerreader
- The schema used by the reader- Returns:
- The start symbol for the resolving grammar
- Throws:
IOException
-
encode
public static void encode(Encoder e, Schema s, com.fasterxml.jackson.databind.JsonNode n) throws IOException Encodes the given Json node n on to the encoder e according to the schema s.- Parameters:
e
- The encoder to encode into.s
- The schema for the object being encoded.n
- The Json node to encode.- Throws:
IOException
-