Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
type T struct {
N uint64
}
func (*T) MarshalJSON ¶
MarshalJSON encodes an uint64 into ASCII decimal format in a []byte.
func (*T) UnmarshalJSON ¶
UnmarshalJSON reads a string, which must be a positive integer no larger than math.MaxUint64, skipping any non-numeric content before it.
Note that leading zeros are not considered valid, but basically no such thing as machine generated JSON integers with leading zeroes. Until this is disproven, this is the fastest way to read a positive json integer, and a leading zero is decoded as a zero, and the remainder returned.
Click to show internal directories.
Click to hide internal directories.