Skip to content

Commit

Permalink
Fix JSON encoding of msgpack encoded documents
Browse files Browse the repository at this point in the history
  • Loading branch information
asdine committed Dec 22, 2021
1 parent 3a3e115 commit f1db356
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions document/encoding/msgpack/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ func (e *EncodedDocument) Iterate(fn func(field string, value types.Value) error
return nil
}

func (e *EncodedDocument) MarshalJSON() ([]byte, error) {
return document.MarshalJSON(e)
}

// An EncodedArray implements the types.Array interface on top of an
// encoded representation of an array.
// It is useful for avoiding decoding the entire array when
Expand Down

0 comments on commit f1db356

Please sign in to comment.