Skip to content

Commit

Permalink
add MarshalJSON for default
Browse files Browse the repository at this point in the history
Closes qri-io#108
  • Loading branch information
ranisharim-crossid authored and asaf committed Aug 17, 2021
1 parent 648e8ca commit 2700f78
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions keywords_core.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ func (d *Default) Resolve(pointer jptr.Pointer, uri string) *Schema {
return nil
}

// MarshalJSON implements the json.Marshaller interface for Default
func (d *Default) MarshalJSON() ([]byte, error) {
return json.Marshal(d.data)
}

// UnmarshalJSON implements the json.Unmarshaler interface for Default
func (d *Default) UnmarshalJSON(data []byte) error {
var defaultData interface{}
Expand Down

0 comments on commit 2700f78

Please sign in to comment.