json

package
v0.0.0-...-8ba2f11 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AscJson

func AscJson(inputJSON string) (outputJSON string, err error)

AscJson 把输入的json字符串,按照key升序,返回新的json字符串 inputJSON 输入的inputJSON,如{"key2":"value2","key1":"value1","key3":"value3"} 输出格式,如{"key1":"value1","key2":"value2","key3":"value3"}

func DiffKey

func DiffKey(input1 string, input2 string) (output1 []string, output2 []string, err error)

DiffKey 输入2个json字符串, 输出在第1个字符串中存在,第2个字符串中不存在的key; 输出在第2个字符串中存在,第1个字符串中不存在的key;

func OnlyInput1

func OnlyInput1(input1 string, input2 string) (output map[string]any, err error)

OnlyInput1 输入2个json字符串, 输出仅在第1个字符串中存在的键值对

Types

This section is empty.

Jump to

Keyboard shortcuts

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