Package jsonint provides tools for working with integers in JSON. This helps to work-around that numbers in JSON are effectively "broken".
Go to file
Charles Iliya Krempeaux 21b9c52057 changelog.ca -> reiver.link 2024-08-01 16:36:51 -07:00
LICENSE changelog.ca -> reiver.link 2024-08-01 16:36:51 -07:00
README.md changelog.ca -> reiver.link 2024-08-01 16:36:51 -07:00
errors.go "sourcecode.social/reiver/go-erorr" -> "github.com/reiver/go-erorr" 2024-08-01 15:54:31 -07:00
go.mod "sourcecode.social/reiver/go-erorr" -> "github.com/reiver/go-erorr" 2024-08-01 15:54:31 -07:00
go.sum "sourcecode.social/reiver/go-erorr" -> "github.com/reiver/go-erorr" 2024-08-01 15:54:31 -07:00
int.go "sourcecode.social/reiver/go-erorr" -> "github.com/reiver/go-erorr" 2024-08-01 15:54:31 -07:00
int_marshaljson_test.go "sourcecode.socia/reiver/go-jsonint" -> "github.com/reiver/go-jsonint" 2024-08-01 15:49:52 -07:00
int_unmarshaljson_test.go "sourcecode.socia/reiver/go-jsonint" -> "github.com/reiver/go-jsonint" 2024-08-01 15:49:52 -07:00
isnumeric.go initail commits 2023-09-25 03:46:24 +09:00
isnumeric_test.go initail commits 2023-09-25 03:46:24 +09:00
zero_test.go "sourcecode.socia/reiver/go-jsonint" -> "github.com/reiver/go-jsonint" 2024-08-01 15:49:52 -07:00

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/github.com/reiver/go-jsonint

GoDoc

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)

Import

To import package jsonint use import code like the follownig:

import "github.com/reiver/go-jsonint"

Installation

To install package jsonint do the following:

GOPROXY=direct go get https://github.com/reiver/go-jsonint

Author

Package jsonint was written by Charles Iliya Krempeaux