Charles Iliya Krempeaux 09e0626e3d | ||
---|---|---|
LICENSE | ||
README.md | ||
errors.go | ||
go.mod | ||
go.sum | ||
int.go | ||
int_marshaljson_test.go | ||
int_unmarshaljson_test.go | ||
isnumeric.go | ||
isnumeric_test.go | ||
zero_test.go |
README.md
go-jsonint
Package jsonint provides tools for working with integers in JSON.
This helps to work-around that numbers in JSON are effectively "broken".
Documention
Online documentation, which includes examples, can be found at: http://godoc.org/sourcecode.social/reiver/go-jsonint
Example
Here is an example:
type Account struct {
FollowersCount jsonint.Int `json:"followers_count"`
FollowingCount jsonint.Int `json:"following_count"`
StatusexCount jsonint.Int `json:"statuses_count"`
}
// ...
var account Account
err := json.Unmarshal(data, &account)