{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.oYBlrfqd/b1/golang-github-francoispqt-gojay_1.2.13-5_amd64.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.oYBlrfqd/b2/golang-github-francoispqt-gojay_1.2.13-5_amd64.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,4 +1,4 @@\n \n b3db3810c7c8a1db98c55a2a13e42817 3658088 debug optional gojay-dbgsym_1.2.13-5_amd64.deb\n 90a896fe6d673a9c78ac04e355c7e8b8 3317668 devel optional gojay_1.2.13-5_amd64.deb\n- e93aa7f61ecb7645ea545ef168fdd51e 90696 devel optional golang-github-francoispqt-gojay-dev_1.2.13-5_all.deb\n+ c196061cd4440b7217b61e1d5e2136d5 90696 devel optional golang-github-francoispqt-gojay-dev_1.2.13-5_all.deb\n"}, {"source1": "golang-github-francoispqt-gojay-dev_1.2.13-5_all.deb", "source2": "golang-github-francoispqt-gojay-dev_1.2.13-5_all.deb", "unified_diff": null, "details": [{"source1": "control.tar.xz", "source2": "control.tar.xz", "unified_diff": null, "details": [{"source1": "control.tar", "source2": "control.tar", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "comments": ["Files differ"], "unified_diff": null}]}]}]}, {"source1": "data.tar.xz", "source2": "data.tar.xz", "unified_diff": null, "details": [{"source1": "data.tar", "source2": "data.tar", "unified_diff": null, "details": [{"source1": "./usr/share/gocode/src/github.com/francoispqt/gojay/gojay/codegen/test/annotated_struct/encoding.go", "source2": "./usr/share/gocode/src/github.com/francoispqt/gojay/gojay/codegen/test/annotated_struct/encoding.go", "comments": ["Ordering differences only"], "unified_diff": "@@ -4,14 +4,62 @@\n \n import (\n \t\"database/sql\"\n \t\"github.com/francoispqt/gojay\"\n \t\"time\"\n )\n \n+type Ints []int\n+\n+// UnmarshalJSONArray decodes JSON array elements into slice\n+func (a *Ints) UnmarshalJSONArray(dec *gojay.Decoder) error {\n+\tvar value int\n+\tif err := dec.Int(&value); err != nil {\n+\t\treturn err\n+\t}\n+\t*a = append(*a, value)\n+\treturn nil\n+}\n+\n+// MarshalJSONArray encodes arrays into JSON\n+func (a Ints) MarshalJSONArray(enc *gojay.Encoder) {\n+\tfor _, item := range a {\n+\t\tenc.Int(item)\n+\t}\n+}\n+\n+// IsNil checks if array is nil\n+func (a Ints) IsNil() bool {\n+\treturn len(a) == 0\n+}\n+\n+type Float32s []float32\n+\n+// UnmarshalJSONArray decodes JSON array elements into slice\n+func (a *Float32s) UnmarshalJSONArray(dec *gojay.Decoder) error {\n+\tvar value float32\n+\tif err := dec.Float32(&value); err != nil {\n+\t\treturn err\n+\t}\n+\t*a = append(*a, value)\n+\treturn nil\n+}\n+\n+// MarshalJSONArray encodes arrays into JSON\n+func (a Float32s) MarshalJSONArray(enc *gojay.Encoder) {\n+\tfor _, item := range a {\n+\t\tenc.Float32(item)\n+\t}\n+}\n+\n+// IsNil checks if array is nil\n+func (a Float32s) IsNil() bool {\n+\treturn len(a) == 0\n+}\n+\n type SubMessagesPtr []*SubMessage\n \n func (s *SubMessagesPtr) UnmarshalJSONArray(dec *gojay.Decoder) error {\n \tvar value = &SubMessage{}\n \tif err := dec.Object(value); err != nil {\n \t\treturn err\n \t}\n@@ -46,61 +94,35 @@\n \t}\n }\n \n func (s SubMessages) IsNil() bool {\n \treturn len(s) == 0\n }\n \n-type Float32s []float32\n+// MarshalJSONObject implements MarshalerJSONObject\n+func (p *Payload) MarshalJSONObject(enc *gojay.Encoder) {\n \n-// UnmarshalJSONArray decodes JSON array elements into slice\n-func (a *Float32s) UnmarshalJSONArray(dec *gojay.Decoder) error {\n-\tvar value float32\n-\tif err := dec.Float32(&value); err != nil {\n-\t\treturn err\n-\t}\n-\t*a = append(*a, value)\n-\treturn nil\n }\n \n-// MarshalJSONArray encodes arrays into JSON\n-func (a Float32s) MarshalJSONArray(enc *gojay.Encoder) {\n-\tfor _, item := range a {\n-\t\tenc.Float32(item)\n-\t}\n+// IsNil checks if instance is nil\n+func (p *Payload) IsNil() bool {\n+\treturn p == nil\n }\n \n-// IsNil checks if array is nil\n-func (a Float32s) IsNil() bool {\n-\treturn len(a) == 0\n-}\n+// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject\n+func (p *Payload) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {\n \n-type Ints []int\n+\tswitch k {\n \n-// UnmarshalJSONArray decodes JSON array elements into slice\n-func (a *Ints) UnmarshalJSONArray(dec *gojay.Decoder) error {\n-\tvar value int\n-\tif err := dec.Int(&value); err != nil {\n-\t\treturn err\n \t}\n-\t*a = append(*a, value)\n \treturn nil\n }\n \n-// MarshalJSONArray encodes arrays into JSON\n-func (a Ints) MarshalJSONArray(enc *gojay.Encoder) {\n-\tfor _, item := range a {\n-\t\tenc.Int(item)\n-\t}\n-}\n-\n-// IsNil checks if array is nil\n-func (a Ints) IsNil() bool {\n-\treturn len(a) == 0\n-}\n+// NKeys returns the number of keys to unmarshal\n+func (p *Payload) NKeys() int { return 0 }\n \n // MarshalJSONObject implements MarshalerJSONObject\n func (m *Message) MarshalJSONObject(enc *gojay.Encoder) {\n \tenc.IntKey(\"id\", m.Id)\n \tenc.StringKey(\"name\", m.Name)\n \tenc.Float64Key(\"price\", m.Price)\n \tvar intsSlice = Ints(m.Ints)\n@@ -213,36 +235,14 @@\n \treturn nil\n }\n \n // NKeys returns the number of keys to unmarshal\n func (m *Message) NKeys() int { return 12 }\n \n // MarshalJSONObject implements MarshalerJSONObject\n-func (p *Payload) MarshalJSONObject(enc *gojay.Encoder) {\n-\n-}\n-\n-// IsNil checks if instance is nil\n-func (p *Payload) IsNil() bool {\n-\treturn p == nil\n-}\n-\n-// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject\n-func (p *Payload) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {\n-\n-\tswitch k {\n-\n-\t}\n-\treturn nil\n-}\n-\n-// NKeys returns the number of keys to unmarshal\n-func (p *Payload) NKeys() int { return 0 }\n-\n-// MarshalJSONObject implements MarshalerJSONObject\n func (m *SubMessage) MarshalJSONObject(enc *gojay.Encoder) {\n \tenc.IntKey(\"id\", m.Id)\n \tenc.StringKey(\"description\", m.Description)\n \tenc.TimeKey(\"startDate\", &m.StartTime, \"2006-01-02 15:04:05\")\n \tif m.EndTime != nil {\n \t\tenc.TimeKey(\"endDate\", m.EndTime, \"2006-01-02 15:04:05\")\n \t}\n"}, {"source1": "./usr/share/gocode/src/github.com/francoispqt/gojay/gojay/codegen/test/basic_struct/encoding.go", "source2": "./usr/share/gocode/src/github.com/francoispqt/gojay/gojay/codegen/test/basic_struct/encoding.go", "comments": ["Ordering differences only"], "unified_diff": "@@ -46,63 +46,113 @@\n \t}\n }\n \n func (s SubMessages) IsNil() bool {\n \treturn len(s) == 0\n }\n \n-type Float32s []float32\n+type Ints []int\n \n // UnmarshalJSONArray decodes JSON array elements into slice\n-func (a *Float32s) UnmarshalJSONArray(dec *gojay.Decoder) error {\n-\tvar value float32\n-\tif err := dec.Float32(&value); err != nil {\n+func (a *Ints) UnmarshalJSONArray(dec *gojay.Decoder) error {\n+\tvar value int\n+\tif err := dec.Int(&value); err != nil {\n \t\treturn err\n \t}\n \t*a = append(*a, value)\n \treturn nil\n }\n \n // MarshalJSONArray encodes arrays into JSON\n-func (a Float32s) MarshalJSONArray(enc *gojay.Encoder) {\n+func (a Ints) MarshalJSONArray(enc *gojay.Encoder) {\n \tfor _, item := range a {\n-\t\tenc.Float32(item)\n+\t\tenc.Int(item)\n \t}\n }\n \n // IsNil checks if array is nil\n-func (a Float32s) IsNil() bool {\n+func (a Ints) IsNil() bool {\n \treturn len(a) == 0\n }\n \n-type Ints []int\n+type Float32s []float32\n \n // UnmarshalJSONArray decodes JSON array elements into slice\n-func (a *Ints) UnmarshalJSONArray(dec *gojay.Decoder) error {\n-\tvar value int\n-\tif err := dec.Int(&value); err != nil {\n+func (a *Float32s) UnmarshalJSONArray(dec *gojay.Decoder) error {\n+\tvar value float32\n+\tif err := dec.Float32(&value); err != nil {\n \t\treturn err\n \t}\n \t*a = append(*a, value)\n \treturn nil\n }\n \n // MarshalJSONArray encodes arrays into JSON\n-func (a Ints) MarshalJSONArray(enc *gojay.Encoder) {\n+func (a Float32s) MarshalJSONArray(enc *gojay.Encoder) {\n \tfor _, item := range a {\n-\t\tenc.Int(item)\n+\t\tenc.Float32(item)\n \t}\n }\n \n // IsNil checks if array is nil\n-func (a Ints) IsNil() bool {\n+func (a Float32s) IsNil() bool {\n \treturn len(a) == 0\n }\n \n // MarshalJSONObject implements MarshalerJSONObject\n+func (m *SubMessage) MarshalJSONObject(enc *gojay.Encoder) {\n+\tenc.IntKey(\"Id\", m.Id)\n+\tenc.StringKey(\"Description\", m.Description)\n+\tenc.TimeKey(\"StartTime\", &m.StartTime, time.RFC3339)\n+\tif m.EndTime != nil {\n+\t\tenc.TimeKey(\"EndTime\", m.EndTime, time.RFC3339)\n+\t}\n+}\n+\n+// IsNil checks if instance is nil\n+func (m *SubMessage) IsNil() bool {\n+\treturn m == nil\n+}\n+\n+// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject\n+func (m *SubMessage) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {\n+\n+\tswitch k {\n+\tcase \"Id\":\n+\t\treturn dec.Int(&m.Id)\n+\n+\tcase \"Description\":\n+\t\treturn dec.String(&m.Description)\n+\n+\tcase \"StartTime\":\n+\t\tvar format = time.RFC3339\n+\t\tvar value = time.Time{}\n+\t\terr := dec.Time(&value, format)\n+\t\tif err == nil {\n+\t\t\tm.StartTime = value\n+\t\t}\n+\t\treturn err\n+\n+\tcase \"EndTime\":\n+\t\tvar format = time.RFC3339\n+\t\tvar value = &time.Time{}\n+\t\terr := dec.Time(value, format)\n+\t\tif err == nil {\n+\t\t\tm.EndTime = value\n+\t\t}\n+\t\treturn err\n+\n+\t}\n+\treturn nil\n+}\n+\n+// NKeys returns the number of keys to unmarshal\n+func (m *SubMessage) NKeys() int { return 4 }\n+\n+// MarshalJSONObject implements MarshalerJSONObject\n func (m *Message) MarshalJSONObject(enc *gojay.Encoder) {\n \tenc.IntKey(\"Id\", m.Id)\n \tenc.StringKey(\"Name\", m.Name)\n \tenc.Float64Key(\"Price\", m.Price)\n \tvar intsSlice = Ints(m.Ints)\n \tenc.ArrayKey(\"Ints\", intsSlice)\n \tvar floatsSlice = Float32s(m.Floats)\n@@ -211,57 +261,7 @@\n \n \t}\n \treturn nil\n }\n \n // NKeys returns the number of keys to unmarshal\n func (m *Message) NKeys() int { return 12 }\n-\n-// MarshalJSONObject implements MarshalerJSONObject\n-func (m *SubMessage) MarshalJSONObject(enc *gojay.Encoder) {\n-\tenc.IntKey(\"Id\", m.Id)\n-\tenc.StringKey(\"Description\", m.Description)\n-\tenc.TimeKey(\"StartTime\", &m.StartTime, time.RFC3339)\n-\tif m.EndTime != nil {\n-\t\tenc.TimeKey(\"EndTime\", m.EndTime, time.RFC3339)\n-\t}\n-}\n-\n-// IsNil checks if instance is nil\n-func (m *SubMessage) IsNil() bool {\n-\treturn m == nil\n-}\n-\n-// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject\n-func (m *SubMessage) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {\n-\n-\tswitch k {\n-\tcase \"Id\":\n-\t\treturn dec.Int(&m.Id)\n-\n-\tcase \"Description\":\n-\t\treturn dec.String(&m.Description)\n-\n-\tcase \"StartTime\":\n-\t\tvar format = time.RFC3339\n-\t\tvar value = time.Time{}\n-\t\terr := dec.Time(&value, format)\n-\t\tif err == nil {\n-\t\t\tm.StartTime = value\n-\t\t}\n-\t\treturn err\n-\n-\tcase \"EndTime\":\n-\t\tvar format = time.RFC3339\n-\t\tvar value = &time.Time{}\n-\t\terr := dec.Time(value, format)\n-\t\tif err == nil {\n-\t\t\tm.EndTime = value\n-\t\t}\n-\t\treturn err\n-\n-\t}\n-\treturn nil\n-}\n-\n-// NKeys returns the number of keys to unmarshal\n-func (m *SubMessage) NKeys() int { return 4 }\n"}, {"source1": "./usr/share/gocode/src/github.com/francoispqt/gojay/gojay/codegen/test/embedded_struct/encoding.go", "source2": "./usr/share/gocode/src/github.com/francoispqt/gojay/gojay/codegen/test/embedded_struct/encoding.go", "comments": ["Ordering differences only"], "unified_diff": "@@ -3,54 +3,36 @@\n package embedded_struct\n \n import (\n \t\"github.com/francoispqt/gojay\"\n \t\"time\"\n )\n \n-type SubMessagesPtr []*SubMessage\n-\n-func (s *SubMessagesPtr) UnmarshalJSONArray(dec *gojay.Decoder) error {\n-\tvar value = &SubMessage{}\n-\tif err := dec.Object(value); err != nil {\n-\t\treturn err\n-\t}\n-\t*s = append(*s, value)\n-\treturn nil\n-}\n-\n-func (s SubMessagesPtr) MarshalJSONArray(enc *gojay.Encoder) {\n-\tfor i := range s {\n-\t\tenc.Object(s[i])\n-\t}\n-}\n-\n-func (s SubMessagesPtr) IsNil() bool {\n-\treturn len(s) == 0\n-}\n-\n-type SubMessages []SubMessage\n+type Ints []int\n \n-func (s *SubMessages) UnmarshalJSONArray(dec *gojay.Decoder) error {\n-\tvar value = SubMessage{}\n-\tif err := dec.Object(&value); err != nil {\n+// UnmarshalJSONArray decodes JSON array elements into slice\n+func (a *Ints) UnmarshalJSONArray(dec *gojay.Decoder) error {\n+\tvar value int\n+\tif err := dec.Int(&value); err != nil {\n \t\treturn err\n \t}\n-\t*s = append(*s, value)\n+\t*a = append(*a, value)\n \treturn nil\n }\n \n-func (s SubMessages) MarshalJSONArray(enc *gojay.Encoder) {\n-\tfor i := range s {\n-\t\tenc.Object(&s[i])\n+// MarshalJSONArray encodes arrays into JSON\n+func (a Ints) MarshalJSONArray(enc *gojay.Encoder) {\n+\tfor _, item := range a {\n+\t\tenc.Int(item)\n \t}\n }\n \n-func (s SubMessages) IsNil() bool {\n-\treturn len(s) == 0\n+// IsNil checks if array is nil\n+func (a Ints) IsNil() bool {\n+\treturn len(a) == 0\n }\n \n type Float64s []float64\n \n // UnmarshalJSONArray decodes JSON array elements into slice\n func (a *Float64s) UnmarshalJSONArray(dec *gojay.Decoder) error {\n \tvar value float64\n@@ -69,65 +51,101 @@\n }\n \n // IsNil checks if array is nil\n func (a Float64s) IsNil() bool {\n \treturn len(a) == 0\n }\n \n-type Ints []int\n+type SubMessagesPtr []*SubMessage\n \n-// UnmarshalJSONArray decodes JSON array elements into slice\n-func (a *Ints) UnmarshalJSONArray(dec *gojay.Decoder) error {\n-\tvar value int\n-\tif err := dec.Int(&value); err != nil {\n+func (s *SubMessagesPtr) UnmarshalJSONArray(dec *gojay.Decoder) error {\n+\tvar value = &SubMessage{}\n+\tif err := dec.Object(value); err != nil {\n \t\treturn err\n \t}\n-\t*a = append(*a, value)\n+\t*s = append(*s, value)\n \treturn nil\n }\n \n-// MarshalJSONArray encodes arrays into JSON\n-func (a Ints) MarshalJSONArray(enc *gojay.Encoder) {\n-\tfor _, item := range a {\n-\t\tenc.Int(item)\n+func (s SubMessagesPtr) MarshalJSONArray(enc *gojay.Encoder) {\n+\tfor i := range s {\n+\t\tenc.Object(s[i])\n \t}\n }\n \n-// IsNil checks if array is nil\n-func (a Ints) IsNil() bool {\n-\treturn len(a) == 0\n+func (s SubMessagesPtr) IsNil() bool {\n+\treturn len(s) == 0\n+}\n+\n+type SubMessages []SubMessage\n+\n+func (s *SubMessages) UnmarshalJSONArray(dec *gojay.Decoder) error {\n+\tvar value = SubMessage{}\n+\tif err := dec.Object(&value); err != nil {\n+\t\treturn err\n+\t}\n+\t*s = append(*s, value)\n+\treturn nil\n+}\n+\n+func (s SubMessages) MarshalJSONArray(enc *gojay.Encoder) {\n+\tfor i := range s {\n+\t\tenc.Object(&s[i])\n+\t}\n+}\n+\n+func (s SubMessages) IsNil() bool {\n+\treturn len(s) == 0\n }\n \n // MarshalJSONObject implements MarshalerJSONObject\n-func (i *BaseId) MarshalJSONObject(enc *gojay.Encoder) {\n-\tenc.IntKey(\"Id\", i.Id)\n-\tenc.StringKey(\"Name\", i.Name)\n+func (m *SubMessage) MarshalJSONObject(enc *gojay.Encoder) {\n+\tenc.StringKey(\"Description\", m.Description)\n+\tenc.TimeKey(\"StartTime\", &m.StartTime, time.RFC3339)\n+\tif m.EndTime != nil {\n+\t\tenc.TimeKey(\"EndTime\", m.EndTime, time.RFC3339)\n+\t}\n }\n \n // IsNil checks if instance is nil\n-func (i *BaseId) IsNil() bool {\n-\treturn i == nil\n+func (m *SubMessage) IsNil() bool {\n+\treturn m == nil\n }\n \n // UnmarshalJSONObject implements gojay's UnmarshalerJSONObject\n-func (i *BaseId) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {\n+func (m *SubMessage) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {\n \n \tswitch k {\n-\tcase \"Id\":\n-\t\treturn dec.Int(&i.Id)\n+\tcase \"Description\":\n+\t\treturn dec.String(&m.Description)\n \n-\tcase \"Name\":\n-\t\treturn dec.String(&i.Name)\n+\tcase \"StartTime\":\n+\t\tvar format = time.RFC3339\n+\t\tvar value = time.Time{}\n+\t\terr := dec.Time(&value, format)\n+\t\tif err == nil {\n+\t\t\tm.StartTime = value\n+\t\t}\n+\t\treturn err\n+\n+\tcase \"EndTime\":\n+\t\tvar format = time.RFC3339\n+\t\tvar value = &time.Time{}\n+\t\terr := dec.Time(value, format)\n+\t\tif err == nil {\n+\t\t\tm.EndTime = value\n+\t\t}\n+\t\treturn err\n \n \t}\n \treturn nil\n }\n \n // NKeys returns the number of keys to unmarshal\n-func (i *BaseId) NKeys() int { return 2 }\n+func (m *SubMessage) NKeys() int { return 3 }\n \n // MarshalJSONObject implements MarshalerJSONObject\n func (m *Message) MarshalJSONObject(enc *gojay.Encoder) {\n \tif m.BaseId != nil {\n \t\tenc.IntKey(\"Id\", m.Id)\n \t\tenc.StringKey(\"Name\", m.Name)\n \t}\n@@ -259,51 +277,33 @@\n \treturn nil\n }\n \n // NKeys returns the number of keys to unmarshal\n func (m *Message) NKeys() int { return 14 }\n \n // MarshalJSONObject implements MarshalerJSONObject\n-func (m *SubMessage) MarshalJSONObject(enc *gojay.Encoder) {\n-\tenc.StringKey(\"Description\", m.Description)\n-\tenc.TimeKey(\"StartTime\", &m.StartTime, time.RFC3339)\n-\tif m.EndTime != nil {\n-\t\tenc.TimeKey(\"EndTime\", m.EndTime, time.RFC3339)\n-\t}\n+func (i *BaseId) MarshalJSONObject(enc *gojay.Encoder) {\n+\tenc.IntKey(\"Id\", i.Id)\n+\tenc.StringKey(\"Name\", i.Name)\n }\n \n // IsNil checks if instance is nil\n-func (m *SubMessage) IsNil() bool {\n-\treturn m == nil\n+func (i *BaseId) IsNil() bool {\n+\treturn i == nil\n }\n \n // UnmarshalJSONObject implements gojay's UnmarshalerJSONObject\n-func (m *SubMessage) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {\n+func (i *BaseId) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {\n \n \tswitch k {\n-\tcase \"Description\":\n-\t\treturn dec.String(&m.Description)\n-\n-\tcase \"StartTime\":\n-\t\tvar format = time.RFC3339\n-\t\tvar value = time.Time{}\n-\t\terr := dec.Time(&value, format)\n-\t\tif err == nil {\n-\t\t\tm.StartTime = value\n-\t\t}\n-\t\treturn err\n+\tcase \"Id\":\n+\t\treturn dec.Int(&i.Id)\n \n-\tcase \"EndTime\":\n-\t\tvar format = time.RFC3339\n-\t\tvar value = &time.Time{}\n-\t\terr := dec.Time(value, format)\n-\t\tif err == nil {\n-\t\t\tm.EndTime = value\n-\t\t}\n-\t\treturn err\n+\tcase \"Name\":\n+\t\treturn dec.String(&i.Name)\n \n \t}\n \treturn nil\n }\n \n // NKeys returns the number of keys to unmarshal\n-func (m *SubMessage) NKeys() int { return 3 }\n+func (i *BaseId) NKeys() int { return 2 }\n"}, {"source1": "./usr/share/gocode/src/github.com/francoispqt/gojay/gojay/codegen/test/pooled_struct/encoding.go", "source2": "./usr/share/gocode/src/github.com/francoispqt/gojay/gojay/codegen/test/pooled_struct/encoding.go", "comments": ["Ordering differences only"], "unified_diff": "@@ -20,14 +20,62 @@\n \t\t},\n \t}\n }\n \n var MessagePool *sync.Pool\n var SubMessagePool *sync.Pool\n \n+type Ints []int\n+\n+// UnmarshalJSONArray decodes JSON array elements into slice\n+func (a *Ints) UnmarshalJSONArray(dec *gojay.Decoder) error {\n+\tvar value int\n+\tif err := dec.Int(&value); err != nil {\n+\t\treturn err\n+\t}\n+\t*a = append(*a, value)\n+\treturn nil\n+}\n+\n+// MarshalJSONArray encodes arrays into JSON\n+func (a Ints) MarshalJSONArray(enc *gojay.Encoder) {\n+\tfor _, item := range a {\n+\t\tenc.Int(item)\n+\t}\n+}\n+\n+// IsNil checks if array is nil\n+func (a Ints) IsNil() bool {\n+\treturn len(a) == 0\n+}\n+\n+type Float64s []float64\n+\n+// UnmarshalJSONArray decodes JSON array elements into slice\n+func (a *Float64s) UnmarshalJSONArray(dec *gojay.Decoder) error {\n+\tvar value float64\n+\tif err := dec.Float64(&value); err != nil {\n+\t\treturn err\n+\t}\n+\t*a = append(*a, value)\n+\treturn nil\n+}\n+\n+// MarshalJSONArray encodes arrays into JSON\n+func (a Float64s) MarshalJSONArray(enc *gojay.Encoder) {\n+\tfor _, item := range a {\n+\t\tenc.Float64(item)\n+\t}\n+}\n+\n+// IsNil checks if array is nil\n+func (a Float64s) IsNil() bool {\n+\treturn len(a) == 0\n+}\n+\n type SubMessagesPtr []*SubMessage\n \n func (s *SubMessagesPtr) UnmarshalJSONArray(dec *gojay.Decoder) error {\n \tvar value = &SubMessage{}\n \tif err := dec.Object(value); err != nil {\n \t\treturn err\n \t}\n@@ -62,60 +110,69 @@\n \t}\n }\n \n func (s SubMessages) IsNil() bool {\n \treturn len(s) == 0\n }\n \n-type Float64s []float64\n-\n-// UnmarshalJSONArray decodes JSON array elements into slice\n-func (a *Float64s) UnmarshalJSONArray(dec *gojay.Decoder) error {\n-\tvar value float64\n-\tif err := dec.Float64(&value); err != nil {\n-\t\treturn err\n+// MarshalJSONObject implements MarshalerJSONObject\n+func (m *SubMessage) MarshalJSONObject(enc *gojay.Encoder) {\n+\tenc.IntKey(\"Id\", m.Id)\n+\tenc.StringKey(\"Description\", m.Description)\n+\tenc.TimeKey(\"StartTime\", &m.StartTime, time.RFC3339)\n+\tif m.EndTime != nil {\n+\t\tenc.TimeKey(\"EndTime\", m.EndTime, time.RFC3339)\n \t}\n-\t*a = append(*a, value)\n-\treturn nil\n }\n \n-// MarshalJSONArray encodes arrays into JSON\n-func (a Float64s) MarshalJSONArray(enc *gojay.Encoder) {\n-\tfor _, item := range a {\n-\t\tenc.Float64(item)\n-\t}\n+// IsNil checks if instance is nil\n+func (m *SubMessage) IsNil() bool {\n+\treturn m == nil\n }\n \n-// IsNil checks if array is nil\n-func (a Float64s) IsNil() bool {\n-\treturn len(a) == 0\n-}\n+// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject\n+func (m *SubMessage) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {\n \n-type Ints []int\n+\tswitch k {\n+\tcase \"Id\":\n+\t\treturn dec.Int(&m.Id)\n \n-// UnmarshalJSONArray decodes JSON array elements into slice\n-func (a *Ints) UnmarshalJSONArray(dec *gojay.Decoder) error {\n-\tvar value int\n-\tif err := dec.Int(&value); err != nil {\n+\tcase \"Description\":\n+\t\treturn dec.String(&m.Description)\n+\n+\tcase \"StartTime\":\n+\t\tvar format = time.RFC3339\n+\t\tvar value = time.Time{}\n+\t\terr := dec.Time(&value, format)\n+\t\tif err == nil {\n+\t\t\tm.StartTime = value\n+\t\t}\n \t\treturn err\n+\n+\tcase \"EndTime\":\n+\t\tvar format = time.RFC3339\n+\t\tvar value = &time.Time{}\n+\t\terr := dec.Time(value, format)\n+\t\tif err == nil {\n+\t\t\tm.EndTime = value\n+\t\t}\n+\t\treturn err\n+\n \t}\n-\t*a = append(*a, value)\n \treturn nil\n }\n \n-// MarshalJSONArray encodes arrays into JSON\n-func (a Ints) MarshalJSONArray(enc *gojay.Encoder) {\n-\tfor _, item := range a {\n-\t\tenc.Int(item)\n-\t}\n-}\n+// NKeys returns the number of keys to unmarshal\n+func (m *SubMessage) NKeys() int { return 4 }\n \n-// IsNil checks if array is nil\n-func (a Ints) IsNil() bool {\n-\treturn len(a) == 0\n+// Reset reset fields\n+func (m *SubMessage) Reset() {\n+\tm.Id = 0\n+\tm.Description = \"\"\n+\tm.EndTime = nil\n }\n \n // MarshalJSONObject implements MarshalerJSONObject\n func (m *Message) MarshalJSONObject(enc *gojay.Encoder) {\n \tenc.IntKey(\"Id\", m.Id)\n \tenc.StringKey(\"Name\", m.Name)\n \tenc.Float64Key(\"Price\", m.Price)\n@@ -239,64 +296,7 @@\n \t\tm.MessagesY[i].Reset()\n \t\tSubMessagePool.Put(&m.MessagesY[i])\n \t}\n \tm.MessagesY = nil\n \tm.IsTrue = nil\n \tm.Payload = nil\n }\n-\n-// MarshalJSONObject implements MarshalerJSONObject\n-func (m *SubMessage) MarshalJSONObject(enc *gojay.Encoder) {\n-\tenc.IntKey(\"Id\", m.Id)\n-\tenc.StringKey(\"Description\", m.Description)\n-\tenc.TimeKey(\"StartTime\", &m.StartTime, time.RFC3339)\n-\tif m.EndTime != nil {\n-\t\tenc.TimeKey(\"EndTime\", m.EndTime, time.RFC3339)\n-\t}\n-}\n-\n-// IsNil checks if instance is nil\n-func (m *SubMessage) IsNil() bool {\n-\treturn m == nil\n-}\n-\n-// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject\n-func (m *SubMessage) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {\n-\n-\tswitch k {\n-\tcase \"Id\":\n-\t\treturn dec.Int(&m.Id)\n-\n-\tcase \"Description\":\n-\t\treturn dec.String(&m.Description)\n-\n-\tcase \"StartTime\":\n-\t\tvar format = time.RFC3339\n-\t\tvar value = time.Time{}\n-\t\terr := dec.Time(&value, format)\n-\t\tif err == nil {\n-\t\t\tm.StartTime = value\n-\t\t}\n-\t\treturn err\n-\n-\tcase \"EndTime\":\n-\t\tvar format = time.RFC3339\n-\t\tvar value = &time.Time{}\n-\t\terr := dec.Time(value, format)\n-\t\tif err == nil {\n-\t\t\tm.EndTime = value\n-\t\t}\n-\t\treturn err\n-\n-\t}\n-\treturn nil\n-}\n-\n-// NKeys returns the number of keys to unmarshal\n-func (m *SubMessage) NKeys() int { return 4 }\n-\n-// Reset reset fields\n-func (m *SubMessage) Reset() {\n-\tm.Id = 0\n-\tm.Description = \"\"\n-\tm.EndTime = nil\n-}\n"}]}]}]}]}