1 package tests 2 3 import ( 4 "github.com/mailru/easyjson" 5 "github.com/mailru/easyjson/jwriter" 6 ) 7 8 //easyjson:json 9 type NestedInterfaces struct { 10 Value interface{} 11 Slice []interface{} 12 Map map[string]interface{} 13 } 14 15 type NestedEasyMarshaler struct { 16 EasilyMarshaled bool 17 } 18 19 var _ easyjson.Marshaler = &NestedEasyMarshaler{} 20 21 func (i *NestedEasyMarshaler) MarshalEasyJSON(w *jwriter.Writer) { 22 // We use this method only to indicate that easyjson.Marshaler 23 // interface was really used while encoding. 24 i.EasilyMarshaled = true 25 } 26