v_json

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ANSIC       = "ANSIC"
	UnixDate    = "UnixDate"
	RubyDate    = "RubyDate"
	RFC822      = "RFC822"
	RFC822Z     = "RFC822Z"
	RFC850      = "RFC850"
	RFC1123     = "RFC1123"
	RFC1123Z    = "RFC1123Z"
	RFC3339     = "RFC3339"
	RFC3339Nano = "RFC3339Nano"
	Kitchen     = "Kitchen"
	Stamp       = "Stamp"
	StampMilli  = "StampMilli"
	StampMicro  = "StampMicro"
	StampNano   = "StampNano"
)

time format alias

View Source
const (
	Local = "Local"
	UTC   = "UTC"
)

time zone alias

Variables

View Source
var ConfigWithCustomTimeFormat = jsoniter.ConfigCompatibleWithStandardLibrary

Functions

func AddLocaleAlias

func AddLocaleAlias(alias string, locale *time.Location)

func AddTimeFormatAlias

func AddTimeFormatAlias(alias, format string)

func SetDefaultTimeFormat

func SetDefaultTimeFormat(timeFormat string, timeLocation *time.Location)

Types

type CustomTimeExtension

type CustomTimeExtension struct {
	jsoniter.DummyExtension
}

func (*CustomTimeExtension) UpdateStructDescriptor

func (extension *CustomTimeExtension) UpdateStructDescriptor(structDescriptor *jsoniter.StructDescriptor)

type VS

type VS struct{}
var Json *VS
 ============================================
	Created by andy pangaribuan on 2020/04/01
	Copyright BoltIdea. All rights reserved.
   ============================================

func (*VS) JsonEncode

func (*VS) JsonEncode(obj interface{}) (string, error)

func (*VS) JsonMarshal

func (*VS) JsonMarshal(obj interface{}) ([]byte, error)

func (*VS) JsonUnMarshal

func (*VS) JsonUnMarshal(data []byte, out interface{}) error

func (*VS) MapToJson

func (*VS) MapToJson(maps map[string]interface{}) (string, error)

Jump to

Keyboard shortcuts

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