xjjson

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Camel2Case

func Camel2Case(name string) string

************************************** 其他方法 ************************************** 驼峰式写法转为下划线写法

func Case2Camel

func Case2Camel(name string) string

下划线写法转为驼峰写法

func Lcfirst

func Lcfirst(str string) string

首字母小写

func Ucfirst

func Ucfirst(str string) string

首字母大写

Types

type Buffer

type Buffer struct {
	*bytes.Buffer
}

内嵌bytes.Buffer,支持连写

func NewBuffer

func NewBuffer() *Buffer

func (*Buffer) Append

func (b *Buffer) Append(i interface{}) *Buffer

type JsonCamelCase

type JsonCamelCase struct {
	Value interface{}
}

************************************** 驼峰json **************************************

func (JsonCamelCase) MarshalJSON

func (c JsonCamelCase) MarshalJSON() ([]byte, error)

type JsonSnakeCase

type JsonSnakeCase struct {
	Value interface{}
}

************************************** 下划线json **************************************

func (JsonSnakeCase) MarshalJSON

func (c JsonSnakeCase) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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