Giter VIP home page Giter VIP logo

org.anc.json.validator's Introduction

JSON Schema Validator JSON

Build Status

Master Status Develop Status

Maven

<dependency>
    <groupId>org.anc.json</groupId>
    <artifactId>validator</artifactId>
    <version>${see below}</version>
</dependency>

Latest version : Maven Central

The LAPPS Grid JSON Schema Validator can be used as a libary in other applications or can be used as a stand-alone program from the command line. Under the hood the JSON validation is done by the json-schema-validator project on GitHub.

As a library

The Java library contains two classes of interest:

  1. Validator
    validates a JSON instance document against a JSON schema
  2. SchemaValidator
    validate a JSON Schema document against the Draft-04 JSON Schema specification.

From the command line

java -jar jsonv-x.y.z.jar [-j|-a] -s <schema> [-i <instance.]

OPTIONS

  -a, --alt              schema is specified using alternate syntax.
  -h, --help             this usage message.
  -i, --instance=PARAM   json instance to validate.
  -j, --json             schema is specified in json.
  -s, --schema=PARAM     schema to use for validation.
  -v, --version          displays the current version number.

org.anc.json.validator's People

Watchers

James Cloos avatar Keith Suderman avatar Nancy Ide avatar

org.anc.json.validator's Issues

Separate CLI Application

Currently the JSON Validator is bundled as an uber jar that includes all dependencies. This is so that it can be run as a standalone application from the command line. However, this presents problems when using the validator as a module in another project as the other project likely doesn't want to include all the extra dependencies.

What we need is:

  1. a stripped down JSON library that can be deployed to Maven Central.
  2. a command line program the depends on the validator library.

specify instance w/o flag

Currently the instance to be validated is specified with the -i (--instance) flag. The instance files to be validated should not require a flag and should simply be list after the named parameters.

Extract CLI

Refactor the project and extract the CLI classes into a separate project. People wanting to use the validator as a library don't need the extraneous dependencies.

Read schema from file

If no schema is specified on the command line then the $schema field in the instance should be used. Throw an exception if neither is specified. A schema specified on the command line should take precedence over the $schema field.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.