hjson-go @ v4.0.0
integrity
- size
- 69.6 KiB
- downloaded
- last checked
- overlays
- go
- detected
- go module github.com/hjson/hjson-go/v4
release notes
Now uses go.mod. New import path for the package:
import "github.com/hjson/hjson-go/v4"
Tested on Go 1.11 - 1.18
Breaking changes
- Non-exported struct fields are now ignored.
- Promoted struct fields (fields that belong to embedded structs) are now encoded as direct members on the object into which the fields were promoted. This makes the behavior of hjson.Marshal() the same as the behavior of json.Marshal() in this regard.
- If a type implements encoding.TextMarshaler but not json.Marshaler then the function MarshalText() will be called on it to get a text representation. Both for values and map keys.
\ris no longer removed from strings. If a string contains\rit will not be encoded into a multi-line string but instead a quoted string.- Releases now contain the hjson tool for a lot more architectures. The tool is distributed as compressed archives instead of uncompressed executables.
- hjson.Unmarshal() now converts the Hjson input into JSON and then uses a json.Decoder to unmarshal it. This means that hjson.Unmarshal() now can unmarshal to structs, but also that the destination tree is kept if possible. Values are merged into the destination tree instead of always replacing it at the root.
- The default value of BracesSameLine in EncoderOptions returned by DefaultOptions() has been changed from
falsetotrue. - Encoder options AllowMinusZero and UnknownAsNull have been removed. They never had any effect.
- The flag
-allowMinusZerohas been removed from the hjson tool. It never had any effect.
New features
- New functions UnmarshalWithOptions() and DefaultDecoderOptions(). Possible options are UseJSONNumber and DisallowUnknownFields, both having
falseas default value.
download
unix · zip
curl -fL -o v4.0.0.zip https://ratatoskr.space/pkg/hjson-go/v4.0.0.zip
printf '%s %s\n' '38725617a8e54d557d5399981e015b43755c1a23d7371167a9c802a6ae85a6bf' 'v4.0.0.zip' | sha256sum -c -
windows · zip
$url = "https://ratatoskr.space/pkg/hjson-go/v4.0.0.zip"
$out = "v4.0.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "38725617a8e54d557d5399981e015b43755c1a23d7371167a9c802a6ae85a6bf") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o v4.0.0.tar.gz https://ratatoskr.space/pkg/hjson-go/v4.0.0.tar.gz
printf '%s %s\n' '39261f36dc4a619dd6bd982305e7b8e9886f44e7c7714bd7fe2ea16452b146f8' 'v4.0.0.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "https://ratatoskr.space/pkg/hjson-go/v4.0.0.tar.gz"
$out = "v4.0.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "39261f36dc4a619dd6bd982305e7b8e9886f44e7c7714bd7fe2ea16452b146f8") { throw "sha256 mismatch" }
download via yggdrasil mesh
unix · zip
curl -fL -o v4.0.0.zip http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/hjson-go/v4.0.0.zip
printf '%s %s\n' '38725617a8e54d557d5399981e015b43755c1a23d7371167a9c802a6ae85a6bf' 'v4.0.0.zip' | sha256sum -c -
windows · zip
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/hjson-go/v4.0.0.zip"
$out = "v4.0.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "38725617a8e54d557d5399981e015b43755c1a23d7371167a9c802a6ae85a6bf") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o v4.0.0.tar.gz http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/hjson-go/v4.0.0.tar.gz
printf '%s %s\n' '39261f36dc4a619dd6bd982305e7b8e9886f44e7c7714bd7fe2ea16452b146f8' 'v4.0.0.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/hjson-go/v4.0.0.tar.gz"
$out = "v4.0.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "39261f36dc4a619dd6bd982305e7b8e9886f44e7c7714bd7fe2ea16452b146f8") { throw "sha256 mismatch" }
| artifact | format | size | hashes |
|---|---|---|---|
| v4.0.0.zip | zip | 72.9 KiB |
blake3-24 59404913f39630b5a8905573bbfafb2c290ffe3bbc4718d1
sha256 38725617a8e54d557d5399981e015b43755c1a23d7371167a9c802a6ae85a6bf
sha1 82f280b162ea32f09b01c71deec20c80da123081
|
| v4.0.0.tar.gz | tar.gz | 33.6 KiB |
blake3-24 f1af51348f7fb6c28a66bc625c295cf3d2ab6bd69bc42103
sha256 39261f36dc4a619dd6bd982305e7b8e9886f44e7c7714bd7fe2ea16452b146f8
sha1 fc31db5471c5807e92e6136bc9c115398c325afb
|
go module archive
module zip with the module path rewritten to this mirror; fetched by go get through the
GOPROXY route
| artifact | format | size | hashes |
|---|---|---|---|
| v4.0.0.zip | zip | 77.5 KiB |
blake3-24 e5ca3ddbec31a7337335cdad2454a52af191997d1ee9b848
sha256 00a0bb85fd338845082a762db8ad11a4ce30c48278cb22bf605a6968c20db6cd
sha1 5dbc93e6d1e6072442695e1b9b884dbe3ab83261
|
install
bazel
http_archive(
name = "hjson-go",
urls = ["https://ratatoskr.space/pkg/hjson-go/v4.0.0.tar.gz"],
integrity = "sha256-OSYfNtxKYZ3WvZgjBee46YhvROfHcUvX/i6hZFKxRvg=",
strip_prefix = "hjson-go-v4.0.0",
)
zig
.url = "https://ratatoskr.space/pkg/hjson-go/v4.0.0.tar.gz",
go
GOPROXY=https://ratatoskr.space GOSUMDB=off go get ratatoskr.space/pkg/hjson-go/v4@v4.0.0
install via yggdrasil mesh
bazel
http_archive(
name = "hjson-go",
urls = ["http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/hjson-go/v4.0.0.tar.gz"],
integrity = "sha256-OSYfNtxKYZ3WvZgjBee46YhvROfHcUvX/i6hZFKxRvg=",
strip_prefix = "hjson-go-v4.0.0",
)
zig
.url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/hjson-go/v4.0.0.tar.gz",
go
GOPROXY=http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg GOSUMDB=off GOINSECURE=14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/* go get 14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/hjson-go/v4@v4.0.0