diff options
Diffstat (limited to 'vendor/github.com/mailru/easyjson/helpers.go')
-rw-r--r-- | vendor/github.com/mailru/easyjson/helpers.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/mailru/easyjson/helpers.go b/vendor/github.com/mailru/easyjson/helpers.go index b86b87d228..04ac635628 100644 --- a/vendor/github.com/mailru/easyjson/helpers.go +++ b/vendor/github.com/mailru/easyjson/helpers.go @@ -26,6 +26,16 @@ type Optional interface { IsDefined() bool } +// UnknownsUnmarshaler provides a method to unmarshal unknown struct fileds and save them as you want +type UnknownsUnmarshaler interface { + UnmarshalUnknown(in *jlexer.Lexer, key string) +} + +// UnknownsMarshaler provides a method to write additional struct fields +type UnknownsMarshaler interface { + MarshalUnknowns(w *jwriter.Writer, first bool) +} + // Marshal returns data as a single byte slice. Method is suboptimal as the data is likely to be copied // from a chain of smaller chunks. func Marshal(v Marshaler) ([]byte, error) { |