xjson

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

...

Functions

func FilterPrefix added in v0.0.7

func FilterPrefix(s string) string

FilterPrefix 过滤前置字符直到 { 或 [

func FilterSuffix added in v0.0.7

func FilterSuffix(s string) string

FilterSuffix 过滤后置字符直到 } 或 ]

func FilterUnquote added in v0.0.7

func FilterUnquote(s string) string

FilterUnquote 过滤转义字符

func Format added in v0.0.7

func Format(s string) string

Format 格式化成可用 JSON 字符串

func Minify added in v0.0.5

func Minify(v interface{}) string

Minify ...

func Pretty added in v0.0.5

func Pretty(v interface{}) string

Pretty ...

func Sort added in v0.0.7

func Sort(s string) string

Sort ...

func ToGoStruct added in v0.0.7

func ToGoStruct(s string) (string, error)

ToGoStruct ...

Types

type JSON added in v0.0.5

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

JSON ...

func New

func New(s string) *JSON

New ...

func (*JSON) Index added in v0.0.5

func (j *JSON) Index(index int) *JSON

Index ...

func (*JSON) Key added in v0.0.5

func (j *JSON) Key(key string) *JSON

Key ...

func (*JSON) ToInt64 added in v0.0.6

func (j *JSON) ToInt64() int64

ToInt ...

func (*JSON) ToJSON added in v0.0.5

func (j *JSON) ToJSON() string

ToJSON ...

func (*JSON) ToMap added in v0.0.6

func (j *JSON) ToMap() map[string]interface{}

ToMap ...

func (*JSON) ToSlice added in v0.0.6

func (j *JSON) ToSlice() []interface{}

ToSlice ...

func (*JSON) ToString added in v0.0.5

func (j *JSON) ToString() string

ToString ...

func (*JSON) Value added in v0.0.5

func (j *JSON) Value() interface{}

Value ...

Jump to

Keyboard shortcuts

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