json icon indicating copy to clipboard operation
json copied to clipboard

Drop-in replacement for Golang encoding/json with additional features.

Results 6 json issues
Sort by recently updated
recently updated
newest added

Is it possible to set empty [], currently it shows null? Something like ```Text []Text `json:"text" default:"value,[]"` ``` or better way I just want to set default value when value...

I tested the empty struct and it worked. Code i used to test the code. ```go package main import ( "fmt" jsone "github.com/clarketm/json" ) type Test struct { Hello string...

Hi! After the recent upgrade to v1.17.1, builds are failing with this error: `encode.go:1260:12: sf.IsExported undefined (type reflect.StructField has no field or method IsExported)` Confirmed with go1.14.15 and go1.16.5.

See [this](https://play.golang.org/p/vmp7Sx8kgrN) playground example. Docs says: > * Support zero values of structs with omitempty: golang/go#11939. >> If omitempty is applied to a struct and all the children of the...

```go import "github.com/shopspring/decimal" type example struct { Decimal decimal.Decimal `json:",omitempty"` //This field is always omitted } ```