Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 1.5% on proxy.golang.org
Top 0.6% dependent packages on proxy.golang.org
Top 0.4% dependent repos on proxy.golang.org
Top 3.1% forks on proxy.golang.org
Top 1.1% docker downloads on proxy.golang.org

proxy.golang.org : github.com/santhosh-tekuri/jsonschema/v2

Package jsonschema provides json-schema compilation and validation. This implementation of JSON Schema, supports draft4, draft6 and draft7. Passes all tests(including optional) in https://github.com/json-schema/JSON-Schema-Test-Suite An example of using this package: The schema is compiled against the version specified in `$schema` property. If `$schema` property is missing, it uses latest draft which currently is draft7. You can force to use draft4 when `$schema` is missing, as follows: you can also validate go value using schema.ValidateInterface(interface{}) method. but the argument should not be user-defined struct. This package supports loading json-schema from filePath and fileURL. To load json-schema from HTTPURL, add following import: Loading from urls for other schemes (such as ftp), can be plugged in. see package jsonschema/httploader for an example To load json-schema from in-memory: This package supports json string formats: date-time, date, time, hostname, email, ip-address, ipv4, ipv6, uri, uriref, regex, format, json-pointer, relative-json-pointer, uri-template (limited validation). Developers can register their own formats by adding them to jsonschema.Formats map. "base64" contentEncoding is supported. Custom decoders can be registered by adding them to jsonschema.Decoders map. "application/json" contentMediaType is supported. Custom mediatypes can be registered by adding them to jsonschema.MediaTypes map. The ValidationError returned by Validate method contains detailed context to understand why and where the error is. Custom Extensions can be registered as shown in extension_test.go

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/santhosh-tekuri/jsonschema/v2
Keywords: draft2019-09, draft2020-12, draft4, draft6, draft7, go, golang, golang-library, json, json-schema, jsonschema, validation, validator
License: BSD-3-Clause
Latest release: over 4 years ago
First release: about 5 years ago
Namespace: github.com/santhosh-tekuri/jsonschema
Dependent packages: 60
Dependent repositories: 232
Stars: 570 on GitHub
Forks: 63 on GitHub
Docker dependents: 10
Docker downloads: 57,425
See more repository details: repos.ecosyste.ms
Last synced: about 4 hours ago

    Loading...
    Readme
    Loading...