ejson

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package ejson Description: 用于处理json的工具

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func E到Json added in v1.4.9

func E到Json(v interface{}) string

E到Json

func Json美化 added in v1.4.9

func Json美化(v interface{}) string

func Json解析 added in v1.4.9

func Json解析(data string, path string) gjson.Result

Json解析 解析对象

func Json解析文本 added in v1.4.9

func Json解析文本(data string, path string) string

Json解析文本 直接返回解析文本

Types

type EJson

type EJson struct {
	EJsonI
	// contains filtered or unexported fields
}

func NewEJson

func NewEJson() *EJson

func (*EJson) E加载

func (e *EJson) E加载(字符串 string) error

func (*EJson) E加载从env配置内容 added in v1.5.0

func (e *EJson) E加载从env配置内容(env内容 string) error

E加载从env配置内容 从.env格式字符串加载内容

func (*EJson) E加载从ini配置内容 added in v1.5.0

func (e *EJson) E加载从ini配置内容(INI字符串 string) error

E加载从ini配置内容 从INI格式字符串加载内容

func (*EJson) E加载从toml配置内容 added in v1.5.1

func (e *EJson) E加载从toml配置内容(toml内容 string) error

E加载从toml配置内容 从TOML格式字符串加载内容

func (*EJson) E加载从yaml配置内容 added in v1.5.1

func (e *EJson) E加载从yaml配置内容(yaml内容 string) error

E加载从yaml配置内容 从YAML格式字符串加载内容

func (*EJson) E取值

func (e *EJson) E取值(pathKey string) (any, error)

func (*EJson) E导出为JSON

func (e *EJson) E导出为JSON() (string, error)

func (*EJson) E置值

func (e *EJson) E置值(pathKey string, value any) error

type EJsonI

type EJsonI interface {
	E加载(字符串 string) error
	E加载从env配置内容(字符串 string) error
	E加载从ini配置内容(字符串 string) error
	E加载从yaml配置内容(字符串 string) error
	E加载从toml配置内容(字符串 string) error
	E导出为JSON() (string, error)
	E置值(pathKey string, value any) error
	E取值(pathKey string) (any, error)
}

Jump to

Keyboard shortcuts

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