diff --git a/go.mod b/go.mod index bb3ca65..c3fd7c6 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/qri-io/jsonschema +module github.com/crossid/jsonschema go 1.13 diff --git a/keywords_core.go b/keywords_core.go index 1c61bdd..8908beb 100644 --- a/keywords_core.go +++ b/keywords_core.go @@ -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{}