Skip to content

Commit

Permalink
Merge pull request #393 from rajiv-k/schema
Browse files Browse the repository at this point in the history
schema: Omit null fields from being encoded to JSON
  • Loading branch information
xitongsys authored Sep 8, 2021
2 parents 1566607 + 6c63556 commit 5f9f710
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions schema/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
)

type JSONSchemaItemType struct {
Tag string
Fields []*JSONSchemaItemType
Tag string `json:"Tag"`
Fields []*JSONSchemaItemType `json:"Fields,omitempty"`
}

func NewJSONSchemaItem() *JSONSchemaItemType {
Expand Down

0 comments on commit 5f9f710

Please sign in to comment.