Skip to content

Commit 2700f78

Browse files
ranisharim-crossidasaf
authored andcommitted
add MarshalJSON for default
Closes #108
1 parent 648e8ca commit 2700f78

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

keywords_core.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ func (d *Default) Resolve(pointer jptr.Pointer, uri string) *Schema {
139139
return nil
140140
}
141141

142+
// MarshalJSON implements the json.Marshaller interface for Default
143+
func (d *Default) MarshalJSON() ([]byte, error) {
144+
return json.Marshal(d.data)
145+
}
146+
142147
// UnmarshalJSON implements the json.Unmarshaler interface for Default
143148
func (d *Default) UnmarshalJSON(data []byte) error {
144149
var defaultData interface{}

0 commit comments

Comments
 (0)