CrossClj

0.4.1 docs

SourceDocs



RECENT
    VARS
    ->factory
    ->json-schema
    build-factory
    json-validator
    validate
    validator

    « Index of all namespaces of this project

    Private
    (->factory value)
    Converts value to a JsonSchemaFactory if it isn't one.
    
    Private
    (->json-schema schema factory)
    Creates a JSONSchema instance either from a JSON string or a Clojure Map.
    
    Private
    (build-factory {:keys [dereferencing], :or {dereferencing :canonical}})
    Creates a JsonSchemaFactory based on the options map.
    
    (json-validator schema)(json-validator schema json-schema-factory)
    Returns a JSON string validator (a single arity fn).
    Schema can be given either as a JSON String or a Clojure Map.
    
    To configure the validator, you can pass a JsonSchemaFactory instance or a
    options map as the second parameter. See scjsv.core/validator docstring for
    the options.
    Private
    (validate json-schema data)
    Validates (f data) against a given JSON Schema.
    
    (validator schema)(validator schema json-schema-factory)
    Returns a Clojure data structure validator (a single arity fn).
    Schema can be given either as a JSON String or a Clojure Map.
    
    To configure the validator, you can pass a JsonSchemaFactory instance or an
    options map as the second parameter. The options map can have the following
    keys:
    
    :dereferencing -- Which dereferencing mode to use. Either :canonical (default)
                      or :inline.