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

Top 2.0% on proxy.golang.org
Top 0.5% dependent packages on proxy.golang.org
Top 0.5% dependent repos on proxy.golang.org
Top 5.2% forks on proxy.golang.org
Top 1.1% docker downloads on proxy.golang.org

proxy.golang.org : github.com/tailscale/hujson

Package hujson contains a parser and packer for the JWCC format: JSON With Commas and Comments (or "human JSON"). JWCC is an extension of standard JSON (as defined in RFC 8259) in order to make it more suitable for humans and configuration files. In particular, it supports line comments (e.g., //...), block comments (e.g., /*...*/), and trailing commas after the last member or element in a JSON object or array. See https://nigeltao.github.io/blog/2021/json-with-commas-comments.html The Parse function parses HuJSON input as a Value, which is a syntax tree exactly representing the input. Comments and whitespace are represented using the Extra type. Composite types in JSON are represented using the Object and Array types. Primitive types in JSON are represented using the Literal type. The Value.Pack method serializes the syntax tree as raw output, which is byte-for-byte identical to the input if no transformations were performed on the value. A HuJSON value can be transformed using the Minimize, Standardize, Format, or Patch methods. Each of these methods mutate the value in place. Call the Clone method beforehand in order to preserve the original value. The Minimize and Standardize methods coerces HuJSON into standard JSON. The Format method formats the value; it is similar to `go fmt`, but instead for the HuJSON and standard JSON format. The Patch method applies a JSON Patch (RFC 6902) to the receiving value. The changes to the JSON grammar are: This package operates with HuJSON as an AST. In order to parse HuJSON into arbitrary Go types, use this package to parse HuJSON input as an AST, strip the AST of any HuJSON-specific lexicographical elements, and then pack the AST as a standard JSON output. Example usage:

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/tailscale/hujson
License: BSD-3-Clause
Latest release: over 2 years ago
First release: about 3 years ago
Namespace: github.com/tailscale
Dependent packages: 116
Dependent repositories: 128
Stars: 453 on GitHub
Forks: 17 on GitHub
Docker dependents: 67
Docker downloads: 19,474,779
See more repository details: repos.ecosyste.ms
Last synced: 2 days ago

    Loading...
    Readme
    Loading...