Constructor and Description |
---|
Parser() |
Modifier and Type | Method and Description |
---|---|
Schema.Parser |
addTypes(Map<String,Schema> types)
Adds the provided types to the set of defined, named types known to this
parser.
|
Map<String,Schema> |
getTypes()
Returns the set of defined, named types known to this parser.
|
boolean |
getValidate()
True iff names are validated.
|
boolean |
getValidateDefaults()
True iff default values are validated.
|
Schema |
parse(File file)
Parse a schema from the provided file.
|
Schema |
parse(InputStream in)
Parse a schema from the provided stream.
|
Schema |
parse(String s)
Parse a schema from the provided string.
|
Schema |
parse(String s,
String... more)
Read a schema from one or more json strings
|
Schema.Parser |
setValidate(boolean validate)
Enable or disable name validation.
|
Schema.Parser |
setValidateDefaults(boolean validateDefaults)
Enable or disable default value validation.
|
public Schema.Parser addTypes(Map<String,Schema> types)
public Map<String,Schema> getTypes()
public Schema.Parser setValidate(boolean validate)
public boolean getValidate()
public Schema.Parser setValidateDefaults(boolean validateDefaults)
public boolean getValidateDefaults()
public Schema parse(File file) throws IOException
IOException
public Schema parse(InputStream in) throws IOException
IOException
Copyright © 2009–2020 The Apache Software Foundation. All rights reserved.