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

proxy.golang.org : github.com/jackc/mp

Package mp (map parser) provides a parser that parses maps into types defined at runtime. The purpose of this package is to make it easy to parse and validate JSON or form submissions. A Type is defined by a set of fields. Each field has a name and a set of ValueConverters. A ValueConverter is a function that converts a value to a different type or validates the value. A Record is an "instance" of a Type. It is created by calling Type.Parse with a map[string]any. The map is converted to a Record by applying the ValueConverters for each field. If any of the ValueConverters fail then the Record is considered invalid. The original map and the errors are stored in the Record.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/jackc/mp
License: MIT
Latest release: almost 2 years ago
First release: almost 2 years ago
Namespace: github.com/jackc
Stars: 1 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 2 months ago

    Loading...
    Readme
    Loading...