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

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/reiver/go-denary

Package denary provides base-10 numbers. This type is safe for using with money. Package denary provides support for the JSON data format, and in particular for the built-in "encoding/json" package, via ‘denary.Nullable’. So, for example, it could be used as: In this example, the ‘Purchase.Amount’ field is used to safely store a money amount. For this example, because ‘Purchase.Amount’ is a ‘denary.Nullable’, it can handle JSON values such as: In that example we assigned the JSON ‘null’ to ‘Purchase.Amount’. And: In that example we assigned the JSON number ‘14’ to ‘Purchase.Amount’. And: In that example we assigned the JSON number ‘2.31’ to ‘Purchase.Amount’. And: In that example we assigned the JSON string ‘"14"’ to ‘Purchase.Amount’. And: In that example we assigned the JSON string ‘"2.31"’ to ‘Purchase.Amount’. If you wanted to create a ‘Purchase.Amount’ literal, you could use ‘denary.Parse().NullError()’ to do that:

Registry - Source - Documentation - JSON - codemeta.json
purl: pkg:golang/github.com/reiver/go-denary
License: MIT
Latest release: over 6 years ago
First release: over 6 years ago
Namespace: github.com/reiver
Last synced: 27 days ago

    Loading...
    Readme
    Loading...