Skip to content

cbsinteractive/mc-json

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json

A fork of encoding/json that fixes omitempty behavior on structs

https://play.golang.org/p/M8AOBJgWMJy

Example

T := struct {
	B struct {} `json:",omitempty"`
}{}

json.NewEncoder(os.Stdout).Encode(T) // stdlib
NewEncoder(os.Stdout).Encode(T) // this package

Output

{"B":{}} // stdlib
{} // this package

About

fork of encoding/json that fixes omitempty behavior on structs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%