jsonvalue

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2020 License: BSD-3-Clause Imports: 7 Imported by: 20

README

jsonvalue

GoDoc Latest

jsonvalue is a Golang package for JSON parsing. It is used in situations those Go structures cannot achieve, or map[string]interface{} could not do properbally.

Quick Start

Marshaling

Sometimes we want to create a complex JSON object like:

{
    "someObject": {
        "someObject": {
            "someObject": {
                "message": "Hello, JSON!"
            }
        }
    }
}

With jsonvalue, It is quite simple to achieve this:

    v := jsonvalue.NewObject()
    v.SetString("Hello, JSON").At("someObject", "someObject", "someObject", "message")
    fmt.Println(v.MustMarshalString())
    // Output:
    // {"someObject":{"someObject":{"someObject":{"message":"Hello, JSON!"}}}

Playground

Similarly, it is quite easy to create sub-arrays like:

[
    {
        "someArray": [
            "Hello, JSON!"
        ]
    }
]
    v := jsonvalue.NewArray()
    v.SetString("Hello, JSON").At(0, "someObject", 0)
    fmt.Println(v.MustMarshalString())
    // Output:
    // [{"someObject":["Hello, JSON"]}]

Playground

However, it is quite complex and annoying in automatically creating array. I strongly suggest using SetArray() to create the array first, then use Append() or Insert() to set array elements. Please refer go godoc.

License

License

Documentation

Overview

Package jsonvalue is for JSON parsing and setting. It is used in situations those Go structures cannot achieve, or "map[string]interface{}" could not do properbally.

As a quick start:

v := jsonvalue.NewObject()
v.SetString("Hello, JSON").At("someObject", "someObject", "someObject", "message")  // automatically create sub objects
fmt.Println(v.MustMarshalString())                                                  // marshal to string type
// Output:
// {"someObject":{"someObject":{"someObject":{"message":"Hello, JSON!"}}}

If you want to parse raw JSON data, use Unmarshal()

raw := []byte(`{"message":"hello, world"}`)
v, err := jsonvalue.Unmarshal(raw)
s, _ := v.GetString("message")
fmt.Println(s)
// Output:
// hello, world

Index

Examples

Constants

View Source
const (
	// ErrNilParameter identifies input paremeter is nil
	ErrNilParameter = Error("nil parameter")
	// ErrValueUninitialized identifies that a V object is not initialized
	ErrValueUninitialized = Error("jsonvalue instance is not initialized")
	// ErrRawBytesUnrecignized identifies all unexpected raw bytes
	ErrRawBytesUnrecignized = Error("unrecognized raw text")
	// ErrNotValidBoolValue shows that a value starts with 't' or 'f' is not eventually a bool value
	ErrNotValidBoolValue = Error("not a valid bool object")
	// ErrNotValidNulllValue shows that a value starts with 'n' is not eventually a bool value
	ErrNotValidNulllValue = Error("not a valid null object")
	// ErrOutOfRange identifies that given position for a JSON array is out of range
	ErrOutOfRange = Error("out of range")
	// ErrNotFound shows that given target is not found in Delete()
	ErrNotFound = Error("target not found")
	// ErrTypeNotMatch shows that value type is not same as GetXxx()
	ErrTypeNotMatch = Error("not match given type")
	// ErrNotArrayValue shows that operation target value is not an array
	ErrNotArrayValue = Error("not an array typed value")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Append

type Append struct {
	// contains filtered or unexported fields
}

Append type is for InTheEnd() or InTheBeginning() function. Please refer to related functions.

Shoud ONLY be generated by V.Append() function

func (*Append) InTheBeginning

func (apd *Append) InTheBeginning(params ...interface{}) (*V, error)

InTheBeginning completes the following operation of Append().

Example
package main

import (
	"fmt"

	jsonvalue "github.com/Andrew-M-C/go.jsonvalue"
)

func main() {
	s := `{"obj":{"arr":[1,2,3,4,5]}}`
	v, _ := jsonvalue.UnmarshalString(s)

	// append a zero in the bebinning of v.obj.arr
	v.AppendInt(0).InTheBeginning("obj", "arr")
	s = v.MustMarshalString()

	fmt.Println(s)
}
Output:

{"obj":{"arr":[0,1,2,3,4,5]}}

func (*Append) InTheEnd

func (apd *Append) InTheEnd(params ...interface{}) (*V, error)

InTheEnd completes the following operation of Append().

Example
package main

import (
	"fmt"

	jsonvalue "github.com/Andrew-M-C/go.jsonvalue"
)

func main() {
	s := `{"obj":{"arr":[1,2,3,4,5]}}`
	v, _ := jsonvalue.UnmarshalString(s)

	// append a zero in the end of v.obj.arr
	v.AppendInt(0).InTheEnd("obj", "arr")
	s = v.MustMarshalString()

	fmt.Println(s)
}
Output:

{"obj":{"arr":[1,2,3,4,5,0]}}

type Error

type Error string

Error is equavilent to string and used to create some error constants in this package. Error constants: http://godoc.org/github.com/Andrew-M-C/go.jsonvalue/#pkg-constants

func (Error) Error

func (e Error) Error() string

type Insert

type Insert struct {
	// contains filtered or unexported fields
}

Insert type is for After() and Before() function. Please refer for realated function.

Should be generated ONLY BY V.Insert function!

func (*Insert) After

func (ins *Insert) After(firstParam interface{}, otherParams ...interface{}) (*V, error)

After completes the following operation of Insert().

The last parameter identifies the postion where a new JSON is inserted after, it should ba an interger, no matter signed or unsigned. If the position is zero or positive interger, it tells the index of an array. If the position is negative, it tells the backward index of an array.

For example, 0 represents the first, and -2 represents the second last.

Example
package main

import (
	"fmt"

	jsonvalue "github.com/Andrew-M-C/go.jsonvalue"
)

func main() {
	s := `{"obj":{"arr":["hello","world"]}}`
	v, _ := jsonvalue.UnmarshalString(s)

	// insert a word in the middle, which is after the first word of the array
	v.InsertString("my").After("obj", "arr", 0)

	fmt.Println(v.MustMarshalString())
}
Output:

{"obj":{"arr":["hello","my","world"]}}

func (*Insert) Before

func (ins *Insert) Before(firstParam interface{}, otherParams ...interface{}) (*V, error)

Before completes the following operation of Insert().

The last parameter identifies the postion where a new JSON is inserted after, it should ba an interger, no matter signed or unsigned. If the position is zero or positive interger, it tells the index of an array. If the position is negative, it tells the backward index of an array.

For example, 0 represents the first, and -2 represents the second last.

Example
package main

import (
	"fmt"

	jsonvalue "github.com/Andrew-M-C/go.jsonvalue"
)

func main() {
	s := `{"obj":{"arr":["hello","world"]}}`
	v, _ := jsonvalue.UnmarshalString(s)

	// insert a word in the middle, which is before the second word of the array
	v.InsertString("my").Before("obj", "arr", 1)

	fmt.Println(v.MustMarshalString())
}
Output:

{"obj":{"arr":["hello","my","world"]}}

type Opt

type Opt struct {
	// OmitNull tells how to handle null json value. The default value is false.
	// If OmitNull is true, null value will be omitted whan marshaling.
	OmitNull bool
}

Opt is the option of jsonvalue.

Example
package main

import (
	"fmt"

	jsonvalue "github.com/Andrew-M-C/go.jsonvalue"
)

func main() {
	raw := `{"null":null}`
	v, _ := jsonvalue.UnmarshalString(raw)

	s := v.MustMarshalString()
	fmt.Println(s)
	s = v.MustMarshalString(jsonvalue.Opt{OmitNull: true})
	fmt.Println(s)
}
Output:

{"null":null}
{}

type Set

type Set struct {
	// contains filtered or unexported fields
}

Set type is for At() only. Please refer to At() function.

This should be generated by V.Set functions ONLY.

func (*Set) At

func (s *Set) At(firstParam interface{}, otherParams ...interface{}) (*V, error)

At completes the following operation of Set(). It defines posttion of value in Set() and return the new value set.

The usage of At() is perhaps the most important. This function will recursivly search for child value, and set the new value specified by Set() or SetXxx() series functions. Please unfold and read the following examples, they are important.

type V

type V struct {
	// contains filtered or unexported fields
}

V is the main type of jsonvalue, representing a JSON value.

func NewArray

func NewArray() *V

NewArray returns an emty array-typed jsonvalue object

func NewBool

func NewBool(b bool) *V

NewBool returns an initialied boolean jsonvalue object

func NewFloat32

func NewFloat32(f float32, prec int) *V

NewFloat32 returns an initialied num jsonvalue object by float32 type. The precision prec controls the number of digits. Use -1 in prec for automatically precision.

func NewFloat64

func NewFloat64(f float64, prec int) *V

NewFloat64 returns an initialied num jsonvalue object by float64 type. The precision prec controls the number of digits. Use -1 in prec for automatically precision.

Example
package main

import (
	"fmt"

	jsonvalue "github.com/Andrew-M-C/go.jsonvalue"
)

func main() {
	f := 123.123456789
	var v *jsonvalue.V

	v = jsonvalue.NewFloat64(f, 9)
	fmt.Println(v)

	v = jsonvalue.NewFloat64(f, 6)
	fmt.Println(v)

	v = jsonvalue.NewFloat64(f, 10)
	fmt.Println(v)
}
Output:

123.123456789
123.123457
123.1234567890

func NewInt

func NewInt(i int) *V

NewInt returns an initialied num jsonvalue object by int type

func NewInt32

func NewInt32(i int32) *V

NewInt32 returns an initialied num jsonvalue object by int32 type

func NewInt64

func NewInt64(i int64) *V

NewInt64 returns an initialied num jsonvalue object by int64 type

func NewNull

func NewNull() *V

NewNull returns an initialied null jsonvalue object

func NewObject

func NewObject() *V

NewObject returns an empty object-typed jsonvalue object

func NewString

func NewString(s string) *V

NewString returns an initialied string jsonvalue object

func NewUint

func NewUint(u uint) *V

NewUint returns an initialied num jsonvalue object by uint type

func NewUint32

func NewUint32(u uint32) *V

NewUint32 returns an initialied num jsonvalue object by uint32 type

func NewUint64

func NewUint64(u uint64) *V

NewUint64 returns an initialied num jsonvalue object by uint64 type

func Unmarshal

func Unmarshal(b []byte) (ret *V, err error)

Unmarshal parse raw bytes(encoded in UTF-8 or pure AscII) and returns a *V instance.

func UnmarshalString

func UnmarshalString(s string) (*V, error)

UnmarshalString is equavilent to Unmarshal(string(b))

func (*V) Append

func (v *V) Append(child *V) *Append

Append starts appending a child JSON value to a JSON array.

func (*V) AppendArray

func (v *V) AppendArray() *Append

AppendArray is equivalent to Append(jsonvalue.NewArray())

func (*V) AppendBool

func (v *V) AppendBool(b bool) *Append

AppendBool is equivalent to Append(jsonvalue.NewBool(b))

func (*V) AppendFloat32

func (v *V) AppendFloat32(f float32, prec int) *Append

AppendFloat32 is equivalent to Append(jsonvalue.NewFloat32(b))

func (*V) AppendFloat64

func (v *V) AppendFloat64(f float64, prec int) *Append

AppendFloat64 is equivalent to Append(jsonvalue.NewFloat64(b))

func (*V) AppendInt

func (v *V) AppendInt(i int) *Append

AppendInt is equivalent to Append(jsonvalue.NewInt(b))

func (*V) AppendInt32

func (v *V) AppendInt32(i int32) *Append

AppendInt32 is equivalent to Append(jsonvalue.NewInt32(b))

func (*V) AppendInt64

func (v *V) AppendInt64(i int64) *Append

AppendInt64 is equivalent to Append(jsonvalue.NewInt64(b))

func (*V) AppendNull

func (v *V) AppendNull() *Append

AppendNull is equivalent to Append(jsonvalue.NewNull())

func (*V) AppendObject

func (v *V) AppendObject() *Append

AppendObject is equivalent to Append(jsonvalue.NewObject())

func (*V) AppendString

func (v *V) AppendString(s string) *Append

AppendString is equivalent to Append(jsonvalue.NewString(s))

func (*V) AppendUint

func (v *V) AppendUint(u uint) *Append

AppendUint is equivalent to Append(jsonvalue.NewUint(b))

func (*V) AppendUint32

func (v *V) AppendUint32(u uint32) *Append

AppendUint32 is equivalent to Append(jsonvalue.NewUint32(b))

func (*V) AppendUint64

func (v *V) AppendUint64(u uint64) *Append

AppendUint64 is equivalent to Append(jsonvalue.NewUint64(b))

func (*V) Bool

func (v *V) Bool() bool

Bool returns represented bool value. If value is not boolean, returns false.

func (*V) Delete

func (v *V) Delete(firstParam interface{}, otherParams ...interface{}) error

Delete deletes specified JSON value

func (*V) Float32

func (v *V) Float32() float32

Float32 returns represented float32 value. If value is not a number, returns zero.

func (*V) Float64

func (v *V) Float64() float64

Float64 returns represented float64 value. If value is not a number, returns zero.

func (*V) Get

func (v *V) Get(firstParam interface{}, otherParams ...interface{}) (*V, error)

Get returns JSON value in specified position. Param formats are like At()

Example
package main

import (
	"fmt"

	jsonvalue "github.com/Andrew-M-C/go.jsonvalue"
)

func main() {
	s := `{"objA":{"objB":{"message":"Hello, world!"}}}`
	v, _ := jsonvalue.UnmarshalString(s)
	msg, _ := v.Get("objA", "objB", "message")
	fmt.Println(msg.String())
}
Output:

Hello, world!

func (*V) GetArray

func (v *V) GetArray(firstParam interface{}, otherParams ...interface{}) (*V, error)

GetArray is equalivent to v, err := Get(...); raise err if v.IsArray() == false

func (*V) GetBool

func (v *V) GetBool(firstParam interface{}, otherParams ...interface{}) (bool, error)

GetBool is equalivent to v, err := Get(...); v.Bool()

func (*V) GetFloat32

func (v *V) GetFloat32(firstParam interface{}, otherParams ...interface{}) (float32, error)

GetFloat32 is equalivent to v, err := Get(...); v.Int()

func (*V) GetFloat64

func (v *V) GetFloat64(firstParam interface{}, otherParams ...interface{}) (float64, error)

GetFloat64 is equalivent to v, err := Get(...); v.Int()

func (*V) GetInt

func (v *V) GetInt(firstParam interface{}, otherParams ...interface{}) (int, error)

GetInt is equalivent to v, err := Get(...); v.Int()

func (*V) GetInt32

func (v *V) GetInt32(firstParam interface{}, otherParams ...interface{}) (int32, error)

GetInt32 is equalivent to v, err := Get(...); v.Int()

func (*V) GetInt64

func (v *V) GetInt64(firstParam interface{}, otherParams ...interface{}) (int64, error)

GetInt64 is equalivent to v, err := Get(...); v.Int()

func (*V) GetNull

func (v *V) GetNull(firstParam interface{}, otherParams ...interface{}) error

GetNull is equalivent to v, err := Get(...); raise err if v.IsNull() == false

func (*V) GetObject

func (v *V) GetObject(firstParam interface{}, otherParams ...interface{}) (*V, error)

GetObject is equalivent to v, err := Get(...); raise err if v.IsObject() == false

func (*V) GetString

func (v *V) GetString(firstParam interface{}, otherParams ...interface{}) (string, error)

GetString is equalivent to v, err := Get(...); v.String()

func (*V) GetUint

func (v *V) GetUint(firstParam interface{}, otherParams ...interface{}) (uint, error)

GetUint is equalivent to v, err := Get(...); v.Int()

func (*V) GetUint32

func (v *V) GetUint32(firstParam interface{}, otherParams ...interface{}) (uint32, error)

GetUint32 is equalivent to v, err := Get(...); v.Int()

func (*V) GetUint64

func (v *V) GetUint64(firstParam interface{}, otherParams ...interface{}) (uint64, error)

GetUint64 is equalivent to v, err := Get(...); v.Int()

func (*V) GreaterThanInt64Max

func (v *V) GreaterThanInt64Max() bool

GreaterThanInt64Max return true when ALL conditions below are met:

  1. It is a number value.
  2. It is a positive interger.
  3. Its value is greater than 0x7fffffffffffffff.
Example
package main

import (
	"fmt"

	jsonvalue "github.com/Andrew-M-C/go.jsonvalue"
)

func main() {
	v1 := jsonvalue.NewUint64(uint64(9223372036854775808)) // 0x8000000000000000
	v2 := jsonvalue.NewUint64(uint64(9223372036854775807)) // 0x7FFFFFFFFFFFFFFF
	v3 := jsonvalue.NewInt64(int64(-9223372036854775807))
	fmt.Println(v1.GreaterThanInt64Max())
	fmt.Println(v2.GreaterThanInt64Max())
	fmt.Println(v3.GreaterThanInt64Max())
}
Output:

true
false
false

func (*V) Insert

func (v *V) Insert(child *V) *Insert

Insert starts setting a child JSON value

func (*V) InsertArray

func (v *V) InsertArray() *Insert

InsertArray is equivalent to Insert(jsonvalue.NewArray())

func (*V) InsertBool

func (v *V) InsertBool(b bool) *Insert

InsertBool is equivalent to Insert(jsonvalue.NewBool(b))

func (*V) InsertFloat32

func (v *V) InsertFloat32(f float32, prec int) *Insert

InsertFloat32 is equivalent to Insert(jsonvalue.NewFloat32(b))

func (*V) InsertFloat64

func (v *V) InsertFloat64(f float64, prec int) *Insert

InsertFloat64 is equivalent to Insert(jsonvalue.NewFloat64(b))

func (*V) InsertInt

func (v *V) InsertInt(i int) *Insert

InsertInt is equivalent to Insert(jsonvalue.NewInt(b))

func (*V) InsertInt32

func (v *V) InsertInt32(i int32) *Insert

InsertInt32 is equivalent to Insert(jsonvalue.NewInt32(b))

func (*V) InsertInt64

func (v *V) InsertInt64(i int64) *Insert

InsertInt64 is equivalent to Insert(jsonvalue.NewInt64(b))

func (*V) InsertNull

func (v *V) InsertNull() *Insert

InsertNull is equivalent to Insert(jsonvalue.NewNull())

func (*V) InsertObject

func (v *V) InsertObject() *Insert

InsertObject is equivalent to Insert(jsonvalue.NewObject())

func (*V) InsertString

func (v *V) InsertString(s string) *Insert

InsertString is equivalent to Insert(jsonvalue.NewString(s))

func (*V) InsertUint

func (v *V) InsertUint(u uint) *Insert

InsertUint is equivalent to Insert(jsonvalue.NewUint(b))

func (*V) InsertUint32

func (v *V) InsertUint32(u uint32) *Insert

InsertUint32 is equivalent to Insert(jsonvalue.NewUint32(b))

func (*V) InsertUint64

func (v *V) InsertUint64(u uint64) *Insert

InsertUint64 is equivalent to Insert(jsonvalue.NewUint64(b))

func (*V) Int

func (v *V) Int() int

Int returns represented int value. If value is not a number, returns zero.

func (*V) Int32

func (v *V) Int32() int32

Int32 returns represented int32 value. If value is not a number, returns zero.

func (*V) Int64

func (v *V) Int64() int64

Int64 returns represented int64 value. If value is not a number, returns zero.

func (*V) IsArray

func (v *V) IsArray() bool

IsArray tells whether value is an array

func (*V) IsBoolean

func (v *V) IsBoolean() bool

IsBoolean tells whether value is a boolean

func (*V) IsFloat

func (v *V) IsFloat() bool

IsFloat tells whether value is a float point number

func (*V) IsInteger

func (v *V) IsInteger() bool

IsInteger tells whether value is a fix point interger

func (*V) IsNegative

func (v *V) IsNegative() bool

IsNegative tells whether value is a negative number

func (*V) IsNull

func (v *V) IsNull() bool

IsNull tells whether value is a null

func (*V) IsNumber

func (v *V) IsNumber() bool

IsNumber tells whether value is a number

func (*V) IsObject

func (v *V) IsObject() bool

IsObject tells whether value is an object

func (*V) IsPositive

func (v *V) IsPositive() bool

IsPositive tells whether value is a positive number

func (*V) IsString

func (v *V) IsString() bool

IsString tells whether value is a string

func (*V) Len

func (v *V) Len() int

Len returns length of an object or array type JSON value

func (*V) Marshal

func (v *V) Marshal(opt ...Opt) (b []byte, err error)

Marshal returns marshaled bytes

func (*V) MarshalString

func (v *V) MarshalString(opt ...Opt) (s string, err error)

MarshalString is same with Marshal, but returns string

func (*V) MustMarshal

func (v *V) MustMarshal(opt ...Opt) []byte

MustMarshal is the same as Marshal, but panics if error pccurred

func (*V) MustMarshalString

func (v *V) MustMarshalString(opt ...Opt) string

MustMarshalString is the same as MarshalString, but panics if error pccurred

func (*V) RangeArray

func (v *V) RangeArray(callback func(i int, v *V) bool)

RangeArray goes through each children when this is an array value

Return true in callback to continue range iteration, while false to break.

Example
package main

import (
	"fmt"

	jsonvalue "github.com/Andrew-M-C/go.jsonvalue"
)

func main() {
	s := `[1,2,3,4,5,6,7,8,9,10]`
	v, _ := jsonvalue.UnmarshalString(s)

	v.RangeArray(func(i int, v *jsonvalue.V) bool {
		fmt.Println(v)
		return i < 5
	})
}
Output:

1
2
3
4
5
6

func (*V) RangeObjects

func (v *V) RangeObjects(callback func(k string, v *V) bool)

RangeObjects goes through each children when this is an object value

Return true in callback to continue range iteration, while false to break.

func (*V) Set

func (v *V) Set(child *V) *Set

Set starts setting a child JSON value. Please refer to examples of "func (set *Set) At(...)"

https://godoc.org/github.com/Andrew-M-C/go.jsonvalue/#Set.At

func (*V) SetArray

func (v *V) SetArray() *Set

SetArray is equivalent to Set(jsonvalue.NewArray())

func (*V) SetBool

func (v *V) SetBool(b bool) *Set

SetBool is equivalent to Set(jsonvalue.NewBool(b))

func (*V) SetFloat32

func (v *V) SetFloat32(f float32, prec int) *Set

SetFloat32 is equivalent to Set(jsonvalue.NewFloat32(b))

func (*V) SetFloat64

func (v *V) SetFloat64(f float64, prec int) *Set

SetFloat64 is equivalent to Set(jsonvalue.NewFloat64(b))

func (*V) SetInt

func (v *V) SetInt(i int) *Set

SetInt is equivalent to Set(jsonvalue.NewInt(b))

func (*V) SetInt32

func (v *V) SetInt32(i int32) *Set

SetInt32 is equivalent to Set(jsonvalue.NewInt32(b))

func (*V) SetInt64

func (v *V) SetInt64(i int64) *Set

SetInt64 is equivalent to Set(jsonvalue.NewInt64(b))

func (*V) SetNull

func (v *V) SetNull() *Set

SetNull is equivalent to Set(jsonvalue.NewNull())

func (*V) SetObject

func (v *V) SetObject() *Set

SetObject is equivalent to Set(jsonvalue.NewObject())

func (*V) SetString

func (v *V) SetString(s string) *Set

SetString is equivalent to Set(jsonvalue.NewString(s))

func (*V) SetUint

func (v *V) SetUint(u uint) *Set

SetUint is equivalent to Set(jsonvalue.NewUint(b))

func (*V) SetUint32

func (v *V) SetUint32(u uint32) *Set

SetUint32 is equivalent to Set(jsonvalue.NewUint32(b))

func (*V) SetUint64

func (v *V) SetUint64(u uint64) *Set

SetUint64 is equivalent to Set(jsonvalue.NewUint64(b))

func (*V) String

func (v *V) String() string

String returns represented string value or the description for the jsonvalue.V instance if it is not a string.

Example
package main

import (
	"fmt"

	jsonvalue "github.com/Andrew-M-C/go.jsonvalue"
)

func main() {
	v := jsonvalue.NewObject()
	v.SetString("Hello, string").At("object", "message")
	fmt.Println(v)

	child, _ := v.Get("object")
	fmt.Println(child)

	child, _ = v.Get("object", "message")
	fmt.Println(child)
}
Output:

{object: {message: Hello, string}}
{message: Hello, string}
Hello, string

func (*V) Uint

func (v *V) Uint() uint

Uint returns represented uint value. If value is not a number, returns zero.

func (*V) Uint32

func (v *V) Uint32() uint32

Uint32 returns represented uint32 value. If value is not a number, returns zero.

func (*V) Uint64

func (v *V) Uint64() uint64

Uint64 returns represented uint64 value. If value is not a number, returns zero.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL