public class JSONSchemaStore extends Object
Constructor and Description |
---|
JSONSchemaStore() |
JSONSchemaStore(boolean ignoreTrueAdditionalProperties) |
Modifier and Type | Method and Description |
---|---|
static org.json.JSONObject |
falseDocument() |
JSONSchema |
falseSchema() |
static boolean |
isFalseDocument(org.json.JSONObject document) |
static boolean |
isFalseSchema(JSONSchema schema) |
static boolean |
isTrueDocument(org.json.JSONObject document) |
static boolean |
isTrueSchema(JSONSchema schema) |
JSONSchema |
load(URI path)
Loads a JSON schema from a file stored in the computer's filesystem.
|
JSONSchema |
loadFromJSONObject(org.json.JSONObject schemaObject)
Loads a JSON schema directly from a JSON object
|
static org.json.JSONObject |
trueDocument() |
JSONSchema |
trueSchema() |
public JSONSchemaStore()
public JSONSchemaStore(boolean ignoreTrueAdditionalProperties)
ignoreTrueAdditionalProperties
- If true, schemas will discard
"additionalProperties" if the value is
true.public JSONSchema load(URI path) throws FileNotFoundException, JSONSchemaException
path
- The path to the fileFileNotFoundException
JSONSchemaException
public JSONSchema loadFromJSONObject(org.json.JSONObject schemaObject) throws JSONSchemaException
schemaObject
- The JSON documentJSONSchemaException
public static org.json.JSONObject trueDocument()
public JSONSchema trueSchema() throws JSONSchemaException
JSONSchemaException
public static org.json.JSONObject falseDocument()
public JSONSchema falseSchema() throws JSONSchemaException
JSONSchemaException
public static boolean isTrueDocument(org.json.JSONObject document)
public static boolean isTrueSchema(JSONSchema schema)
public static boolean isFalseDocument(org.json.JSONObject document)
public static boolean isFalseSchema(JSONSchema schema)
Copyright © 2022. All rights reserved.