Giter VIP home page Giter VIP logo

rc-circe-json-schema's Introduction

Reactive Core Circe JSON Validator

Maven Central

This is a Scala implementation of a JSON Schema validator based upon the great io.circe Library.

Note: the validator is in early state and API may not be stable.

Features

  • Implementing JSON Schema 2020-12, 2019-09
  • All tests of the JSON Schema Test Suite passing
  • You can bring your own Downloader (using Tagless Final Pattern)
  • Support for Scala 2.12, 2.13 and 3

Known Limitations

  • dynamicRef and dynamicAnchor are very rough implemented
  • Unknown Keywords are ignored and won't be serialized again.
  • Only JSON Schema 2020-12, 2019-09 and one Circe-Version supported so far.
  • The API will only be stable in patch versions

Security Considerations

Regex Patterns are directly given to java.util.regex.Pattern.compile. This could be not secure and could lead to ReDoS Attacks. Do not trust JSON schemas from an untrusted source.

Only use this library for trusted JSON-Schemas

This is BETA-Software. Use at your own risk.

How to use it

Please have a look in the examples folder for some Examples.

There are some main Types

  • Json the JSON Representation of the Circe-Library.
  • Schema represents a single JSON-Schema and can be parsed from Json.
  • Validator a single validator validating some JSON
  • ValidationResult the result of a validation, contains possible violations.
  • DocumentValidator a validator for a full set of JSON-Schema-Documents. This is what you want to use for Validating
  • SingleDocumentValidator representing a single document within DocumentValidator
  • Loader the main entry point to load and parse JSON-Schemas, which provide a DocumentValidator for you.
  • Downloader during resolving, it is possible, that additional URLs need to be downloaded. The downloader is responsible for that and you can bring your own. There exists a dummy implementation which doesn't download anything Downloader.emptySimple and an implementation which is using Java-URL-Facilities Downloader.JavaUrlDownloader

License

The library is released under terms of Apache License 2.0

3rdparty contans 3rd-Party references

  • JSON-Schema-Test-Suite, licensed under terms of MIT-License
  • schema contains the JSON Schemas of JSON Schema, released unter terms of BSD-License.

rc-circe-json-schema's People

Contributors

nob13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rc-circe-json-schema's Issues

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.