summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mailru/easyjson/benchmark
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mailru/easyjson/benchmark')
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/codec_test.go279
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/data.go148
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/data_codec.go6914
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/data_ffjson.go6723
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/data_var.go350
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/default_test.go118
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/dummy_test.go11
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/easyjson_test.go184
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/example.json415
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/ffjson_test.go190
-rw-r--r--vendor/github.com/mailru/easyjson/benchmark/jsoniter_test.go119
-rwxr-xr-xvendor/github.com/mailru/easyjson/benchmark/ujson.sh7
12 files changed, 0 insertions, 15458 deletions
diff --git a/vendor/github.com/mailru/easyjson/benchmark/codec_test.go b/vendor/github.com/mailru/easyjson/benchmark/codec_test.go
deleted file mode 100644
index 5c77072ee..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/codec_test.go
+++ /dev/null
@@ -1,279 +0,0 @@
-// +build use_codec
-
-package benchmark
-
-import (
- "testing"
-
- "github.com/ugorji/go/codec"
-)
-
-func BenchmarkCodec_Unmarshal_M(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
- dec := codec.NewDecoderBytes(nil, h)
-
- b.SetBytes(int64(len(largeStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- dec.ResetBytes(largeStructText)
- if err := dec.Decode(&s); err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkCodec_Unmarshal_S(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
- dec := codec.NewDecoderBytes(nil, h)
-
- b.SetBytes(int64(len(smallStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- dec.ResetBytes(smallStructText)
- if err := dec.Decode(&s); err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkCodec_Marshal_S(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- var l int64
- for i := 0; i < b.N; i++ {
- enc.ResetBytes(&out)
- if err := enc.Encode(&smallStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = nil
- }
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_M(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- var l int64
- for i := 0; i < b.N; i++ {
- enc.ResetBytes(&out)
- if err := enc.Encode(&largeStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = nil
- }
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_L(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- var l int64
- for i := 0; i < b.N; i++ {
- enc.ResetBytes(&out)
- if err := enc.Encode(&xlStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = nil
- }
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_S_Reuse(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- var l int64
- for i := 0; i < b.N; i++ {
- enc.ResetBytes(&out)
- if err := enc.Encode(&smallStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = out[:0]
- }
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_M_Reuse(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- var l int64
- for i := 0; i < b.N; i++ {
- enc.ResetBytes(&out)
- if err := enc.Encode(&largeStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = out[:0]
- }
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_L_Reuse(b *testing.B) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- var l int64
- for i := 0; i < b.N; i++ {
- enc.ResetBytes(&out)
- if err := enc.Encode(&xlStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = out[:0]
- }
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_S_Parallel(b *testing.B) {
- var l int64
-
- b.RunParallel(func(pb *testing.PB) {
- var out []byte
-
- var h codec.Handle = new(codec.JsonHandle)
- enc := codec.NewEncoderBytes(&out, h)
-
- for pb.Next() {
- enc.ResetBytes(&out)
- if err := enc.Encode(&smallStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = nil
- }
- })
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_M_Parallel(b *testing.B) {
- var l int64
-
- b.RunParallel(func(pb *testing.PB) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- for pb.Next() {
- enc.ResetBytes(&out)
- if err := enc.Encode(&largeStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = nil
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_L_Parallel(b *testing.B) {
- var l int64
-
- b.RunParallel(func(pb *testing.PB) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- for pb.Next() {
- enc.ResetBytes(&out)
- if err := enc.Encode(&xlStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = nil
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_S_Parallel_Reuse(b *testing.B) {
- var l int64
-
- b.RunParallel(func(pb *testing.PB) {
- var out []byte
-
- var h codec.Handle = new(codec.JsonHandle)
- enc := codec.NewEncoderBytes(&out, h)
-
- for pb.Next() {
- enc.ResetBytes(&out)
- if err := enc.Encode(&smallStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = out[:0]
- }
- })
-
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_M_Parallel_Reuse(b *testing.B) {
- var l int64
-
- b.RunParallel(func(pb *testing.PB) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- for pb.Next() {
- enc.ResetBytes(&out)
- if err := enc.Encode(&largeStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = out[:0]
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkCodec_Marshal_L_Parallel_Reuse(b *testing.B) {
- var l int64
-
- b.RunParallel(func(pb *testing.PB) {
- var h codec.Handle = new(codec.JsonHandle)
-
- var out []byte
- enc := codec.NewEncoderBytes(&out, h)
-
- for pb.Next() {
- enc.ResetBytes(&out)
- if err := enc.Encode(&xlStructData); err != nil {
- b.Error(err)
- }
- l = int64(len(out))
- out = out[:0]
- }
- })
- b.SetBytes(l)
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/data.go b/vendor/github.com/mailru/easyjson/benchmark/data.go
deleted file mode 100644
index 71eb91a94..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/data.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Package benchmark provides a simple benchmark for easyjson against default serialization and ffjson.
-// The data example is taken from https://dev.twitter.com/rest/reference/get/search/tweets
-package benchmark
-
-import (
- "io/ioutil"
-)
-
-var largeStructText, _ = ioutil.ReadFile("example.json")
-var xlStructData XLStruct
-
-func init() {
- for i := 0; i < 50; i++ {
- xlStructData.Data = append(xlStructData.Data, largeStructData)
- }
-}
-
-var smallStructText = []byte(`{"hashtags":[{"indices":[5, 10],"text":"some-text"}],"urls":[],"user_mentions":[]}`)
-var smallStructData = Entities{
- Hashtags: []Hashtag{{Indices: []int{5, 10}, Text: "some-text"}},
- Urls: []*string{},
- UserMentions: []*string{},
-}
-
-type SearchMetadata struct {
- CompletedIn float64 `json:"completed_in"`
- Count int `json:"count"`
- MaxID int64 `json:"max_id"`
- MaxIDStr string `json:"max_id_str"`
- NextResults string `json:"next_results"`
- Query string `json:"query"`
- RefreshURL string `json:"refresh_url"`
- SinceID int64 `json:"since_id"`
- SinceIDStr string `json:"since_id_str"`
-}
-
-type Hashtag struct {
- Indices []int `json:"indices"`
- Text string `json:"text"`
-}
-
-//easyjson:json
-type Entities struct {
- Hashtags []Hashtag `json:"hashtags"`
- Urls []*string `json:"urls"`
- UserMentions []*string `json:"user_mentions"`
-}
-
-type UserEntityDescription struct {
- Urls []*string `json:"urls"`
-}
-
-type URL struct {
- ExpandedURL *string `json:"expanded_url"`
- Indices []int `json:"indices"`
- URL string `json:"url"`
-}
-
-type UserEntityURL struct {
- Urls []URL `json:"urls"`
-}
-
-type UserEntities struct {
- Description UserEntityDescription `json:"description"`
- URL UserEntityURL `json:"url"`
-}
-
-type User struct {
- ContributorsEnabled bool `json:"contributors_enabled"`
- CreatedAt string `json:"created_at"`
- DefaultProfile bool `json:"default_profile"`
- DefaultProfileImage bool `json:"default_profile_image"`
- Description string `json:"description"`
- Entities UserEntities `json:"entities"`
- FavouritesCount int `json:"favourites_count"`
- FollowRequestSent *string `json:"follow_request_sent"`
- FollowersCount int `json:"followers_count"`
- Following *string `json:"following"`
- FriendsCount int `json:"friends_count"`
- GeoEnabled bool `json:"geo_enabled"`
- ID int `json:"id"`
- IDStr string `json:"id_str"`
- IsTranslator bool `json:"is_translator"`
- Lang string `json:"lang"`
- ListedCount int `json:"listed_count"`
- Location string `json:"location"`
- Name string `json:"name"`
- Notifications *string `json:"notifications"`
- ProfileBackgroundColor string `json:"profile_background_color"`
- ProfileBackgroundImageURL string `json:"profile_background_image_url"`
- ProfileBackgroundImageURLHTTPS string `json:"profile_background_image_url_https"`
- ProfileBackgroundTile bool `json:"profile_background_tile"`
- ProfileImageURL string `json:"profile_image_url"`
- ProfileImageURLHTTPS string `json:"profile_image_url_https"`
- ProfileLinkColor string `json:"profile_link_color"`
- ProfileSidebarBorderColor string `json:"profile_sidebar_border_color"`
- ProfileSidebarFillColor string `json:"profile_sidebar_fill_color"`
- ProfileTextColor string `json:"profile_text_color"`
- ProfileUseBackgroundImage bool `json:"profile_use_background_image"`
- Protected bool `json:"protected"`
- ScreenName string `json:"screen_name"`
- ShowAllInlineMedia bool `json:"show_all_inline_media"`
- StatusesCount int `json:"statuses_count"`
- TimeZone string `json:"time_zone"`
- URL *string `json:"url"`
- UtcOffset int `json:"utc_offset"`
- Verified bool `json:"verified"`
-}
-
-type StatusMetadata struct {
- IsoLanguageCode string `json:"iso_language_code"`
- ResultType string `json:"result_type"`
-}
-
-type Status struct {
- Contributors *string `json:"contributors"`
- Coordinates *string `json:"coordinates"`
- CreatedAt string `json:"created_at"`
- Entities Entities `json:"entities"`
- Favorited bool `json:"favorited"`
- Geo *string `json:"geo"`
- ID int64 `json:"id"`
- IDStr string `json:"id_str"`
- InReplyToScreenName *string `json:"in_reply_to_screen_name"`
- InReplyToStatusID *string `json:"in_reply_to_status_id"`
- InReplyToStatusIDStr *string `json:"in_reply_to_status_id_str"`
- InReplyToUserID *string `json:"in_reply_to_user_id"`
- InReplyToUserIDStr *string `json:"in_reply_to_user_id_str"`
- Metadata StatusMetadata `json:"metadata"`
- Place *string `json:"place"`
- RetweetCount int `json:"retweet_count"`
- Retweeted bool `json:"retweeted"`
- Source string `json:"source"`
- Text string `json:"text"`
- Truncated bool `json:"truncated"`
- User User `json:"user"`
-}
-
-//easyjson:json
-type LargeStruct struct {
- SearchMetadata SearchMetadata `json:"search_metadata"`
- Statuses []Status `json:"statuses"`
-}
-
-//easyjson:json
-type XLStruct struct {
- Data []LargeStruct
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/data_codec.go b/vendor/github.com/mailru/easyjson/benchmark/data_codec.go
deleted file mode 100644
index d2d83fac6..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/data_codec.go
+++ /dev/null
@@ -1,6914 +0,0 @@
-//+build use_codec
-//+build !easyjson_nounsafe
-//+build !appengine
-
-// ************************************************************
-// DO NOT EDIT.
-// THIS FILE IS AUTO-GENERATED BY codecgen.
-// ************************************************************
-
-package benchmark
-
-import (
- "errors"
- "fmt"
- "reflect"
- "runtime"
- "unsafe"
-
- codec1978 "github.com/ugorji/go/codec"
-)
-
-const (
- // ----- content types ----
- codecSelferC_UTF89225 = 1
- codecSelferC_RAW9225 = 0
- // ----- value types used ----
- codecSelferValueTypeArray9225 = 10
- codecSelferValueTypeMap9225 = 9
- // ----- containerStateValues ----
- codecSelfer_containerMapKey9225 = 2
- codecSelfer_containerMapValue9225 = 3
- codecSelfer_containerMapEnd9225 = 4
- codecSelfer_containerArrayElem9225 = 6
- codecSelfer_containerArrayEnd9225 = 7
-)
-
-var (
- codecSelferBitsize9225 = uint8(reflect.TypeOf(uint(0)).Bits())
- codecSelferOnlyMapOrArrayEncodeToStructErr9225 = errors.New(`only encoded map or array can be decoded into a struct`)
-)
-
-type codecSelferUnsafeString9225 struct {
- Data uintptr
- Len int
-}
-
-type codecSelfer9225 struct{}
-
-func init() {
- if codec1978.GenVersion != 5 {
- _, file, _, _ := runtime.Caller(0)
- err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
- 5, codec1978.GenVersion, file)
- panic(err)
- }
- if false { // reference the types, but skip this branch at build/run time
- var v0 unsafe.Pointer
- _ = v0
- }
-}
-
-func (x *SearchMetadata) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [9]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(9)
- } else {
- yynn2 = 9
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- r.EncodeFloat64(float64(x.CompletedIn))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("completed_in"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeFloat64(float64(x.CompletedIn))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeInt(int64(x.Count))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeInt(int64(x.Count))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- r.EncodeInt(int64(x.MaxID))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("max_id"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym11 := z.EncBinary()
- _ = yym11
- if false {
- } else {
- r.EncodeInt(int64(x.MaxID))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.MaxIDStr))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("max_id_str"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym14 := z.EncBinary()
- _ = yym14
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.MaxIDStr))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.NextResults))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("next_results"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym17 := z.EncBinary()
- _ = yym17
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.NextResults))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym19 := z.EncBinary()
- _ = yym19
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Query))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("query"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym20 := z.EncBinary()
- _ = yym20
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Query))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym22 := z.EncBinary()
- _ = yym22
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.RefreshURL))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("refresh_url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym23 := z.EncBinary()
- _ = yym23
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.RefreshURL))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym25 := z.EncBinary()
- _ = yym25
- if false {
- } else {
- r.EncodeInt(int64(x.SinceID))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("since_id"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym26 := z.EncBinary()
- _ = yym26
- if false {
- } else {
- r.EncodeInt(int64(x.SinceID))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym28 := z.EncBinary()
- _ = yym28
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.SinceIDStr))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("since_id_str"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym29 := z.EncBinary()
- _ = yym29
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.SinceIDStr))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *SearchMetadata) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *SearchMetadata) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "completed_in":
- if r.TryDecodeAsNil() {
- x.CompletedIn = 0
- } else {
- yyv4 := &x.CompletedIn
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- *((*float64)(yyv4)) = float64(r.DecodeFloat(false))
- }
- }
- case "count":
- if r.TryDecodeAsNil() {
- x.Count = 0
- } else {
- yyv6 := &x.Count
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- *((*int)(yyv6)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "max_id":
- if r.TryDecodeAsNil() {
- x.MaxID = 0
- } else {
- yyv8 := &x.MaxID
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else {
- *((*int)(yyv8)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "max_id_str":
- if r.TryDecodeAsNil() {
- x.MaxIDStr = ""
- } else {
- yyv10 := &x.MaxIDStr
- yym11 := z.DecBinary()
- _ = yym11
- if false {
- } else {
- *((*string)(yyv10)) = r.DecodeString()
- }
- }
- case "next_results":
- if r.TryDecodeAsNil() {
- x.NextResults = ""
- } else {
- yyv12 := &x.NextResults
- yym13 := z.DecBinary()
- _ = yym13
- if false {
- } else {
- *((*string)(yyv12)) = r.DecodeString()
- }
- }
- case "query":
- if r.TryDecodeAsNil() {
- x.Query = ""
- } else {
- yyv14 := &x.Query
- yym15 := z.DecBinary()
- _ = yym15
- if false {
- } else {
- *((*string)(yyv14)) = r.DecodeString()
- }
- }
- case "refresh_url":
- if r.TryDecodeAsNil() {
- x.RefreshURL = ""
- } else {
- yyv16 := &x.RefreshURL
- yym17 := z.DecBinary()
- _ = yym17
- if false {
- } else {
- *((*string)(yyv16)) = r.DecodeString()
- }
- }
- case "since_id":
- if r.TryDecodeAsNil() {
- x.SinceID = 0
- } else {
- yyv18 := &x.SinceID
- yym19 := z.DecBinary()
- _ = yym19
- if false {
- } else {
- *((*int)(yyv18)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "since_id_str":
- if r.TryDecodeAsNil() {
- x.SinceIDStr = ""
- } else {
- yyv20 := &x.SinceIDStr
- yym21 := z.DecBinary()
- _ = yym21
- if false {
- } else {
- *((*string)(yyv20)) = r.DecodeString()
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *SearchMetadata) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj22 int
- var yyb22 bool
- var yyhl22 bool = l >= 0
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.CompletedIn = 0
- } else {
- yyv23 := &x.CompletedIn
- yym24 := z.DecBinary()
- _ = yym24
- if false {
- } else {
- *((*float64)(yyv23)) = float64(r.DecodeFloat(false))
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Count = 0
- } else {
- yyv25 := &x.Count
- yym26 := z.DecBinary()
- _ = yym26
- if false {
- } else {
- *((*int)(yyv25)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.MaxID = 0
- } else {
- yyv27 := &x.MaxID
- yym28 := z.DecBinary()
- _ = yym28
- if false {
- } else {
- *((*int)(yyv27)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.MaxIDStr = ""
- } else {
- yyv29 := &x.MaxIDStr
- yym30 := z.DecBinary()
- _ = yym30
- if false {
- } else {
- *((*string)(yyv29)) = r.DecodeString()
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.NextResults = ""
- } else {
- yyv31 := &x.NextResults
- yym32 := z.DecBinary()
- _ = yym32
- if false {
- } else {
- *((*string)(yyv31)) = r.DecodeString()
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Query = ""
- } else {
- yyv33 := &x.Query
- yym34 := z.DecBinary()
- _ = yym34
- if false {
- } else {
- *((*string)(yyv33)) = r.DecodeString()
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.RefreshURL = ""
- } else {
- yyv35 := &x.RefreshURL
- yym36 := z.DecBinary()
- _ = yym36
- if false {
- } else {
- *((*string)(yyv35)) = r.DecodeString()
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.SinceID = 0
- } else {
- yyv37 := &x.SinceID
- yym38 := z.DecBinary()
- _ = yym38
- if false {
- } else {
- *((*int)(yyv37)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.SinceIDStr = ""
- } else {
- yyv39 := &x.SinceIDStr
- yym40 := z.DecBinary()
- _ = yym40
- if false {
- } else {
- *((*string)(yyv39)) = r.DecodeString()
- }
- }
- for {
- yyj22++
- if yyhl22 {
- yyb22 = yyj22 > l
- } else {
- yyb22 = r.CheckBreak()
- }
- if yyb22 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj22-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *Hashtag) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [2]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(2)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Indices == nil {
- r.EncodeNil()
- } else {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- z.F.EncSliceIntV(x.Indices, false, e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("indices"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Indices == nil {
- r.EncodeNil()
- } else {
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- z.F.EncSliceIntV(x.Indices, false, e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Text))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("text"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Text))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *Hashtag) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *Hashtag) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "indices":
- if r.TryDecodeAsNil() {
- x.Indices = nil
- } else {
- yyv4 := &x.Indices
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- z.F.DecSliceIntX(yyv4, false, d)
- }
- }
- case "text":
- if r.TryDecodeAsNil() {
- x.Text = ""
- } else {
- yyv6 := &x.Text
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- *((*string)(yyv6)) = r.DecodeString()
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *Hashtag) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj8 int
- var yyb8 bool
- var yyhl8 bool = l >= 0
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Indices = nil
- } else {
- yyv9 := &x.Indices
- yym10 := z.DecBinary()
- _ = yym10
- if false {
- } else {
- z.F.DecSliceIntX(yyv9, false, d)
- }
- }
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Text = ""
- } else {
- yyv11 := &x.Text
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else {
- *((*string)(yyv11)) = r.DecodeString()
- }
- }
- for {
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj8-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *Entities) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [3]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(3)
- } else {
- yynn2 = 3
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Hashtags == nil {
- r.EncodeNil()
- } else {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- h.encSliceHashtag(([]Hashtag)(x.Hashtags), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("hashtags"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Hashtags == nil {
- r.EncodeNil()
- } else {
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- h.encSliceHashtag(([]Hashtag)(x.Hashtags), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Urls == nil {
- r.EncodeNil()
- } else {
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- h.encSlicePtrtostring(([]*string)(x.Urls), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("urls"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Urls == nil {
- r.EncodeNil()
- } else {
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- h.encSlicePtrtostring(([]*string)(x.Urls), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.UserMentions == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- h.encSlicePtrtostring(([]*string)(x.UserMentions), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("user_mentions"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.UserMentions == nil {
- r.EncodeNil()
- } else {
- yym11 := z.EncBinary()
- _ = yym11
- if false {
- } else {
- h.encSlicePtrtostring(([]*string)(x.UserMentions), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *Entities) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *Entities) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "hashtags":
- if r.TryDecodeAsNil() {
- x.Hashtags = nil
- } else {
- yyv4 := &x.Hashtags
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- h.decSliceHashtag((*[]Hashtag)(yyv4), d)
- }
- }
- case "urls":
- if r.TryDecodeAsNil() {
- x.Urls = nil
- } else {
- yyv6 := &x.Urls
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- h.decSlicePtrtostring((*[]*string)(yyv6), d)
- }
- }
- case "user_mentions":
- if r.TryDecodeAsNil() {
- x.UserMentions = nil
- } else {
- yyv8 := &x.UserMentions
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else {
- h.decSlicePtrtostring((*[]*string)(yyv8), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *Entities) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj10 int
- var yyb10 bool
- var yyhl10 bool = l >= 0
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Hashtags = nil
- } else {
- yyv11 := &x.Hashtags
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else {
- h.decSliceHashtag((*[]Hashtag)(yyv11), d)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Urls = nil
- } else {
- yyv13 := &x.Urls
- yym14 := z.DecBinary()
- _ = yym14
- if false {
- } else {
- h.decSlicePtrtostring((*[]*string)(yyv13), d)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.UserMentions = nil
- } else {
- yyv15 := &x.UserMentions
- yym16 := z.DecBinary()
- _ = yym16
- if false {
- } else {
- h.decSlicePtrtostring((*[]*string)(yyv15), d)
- }
- }
- for {
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj10-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *UserEntityDescription) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [1]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(1)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Urls == nil {
- r.EncodeNil()
- } else {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- h.encSlicePtrtostring(([]*string)(x.Urls), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("urls"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Urls == nil {
- r.EncodeNil()
- } else {
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- h.encSlicePtrtostring(([]*string)(x.Urls), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *UserEntityDescription) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *UserEntityDescription) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "urls":
- if r.TryDecodeAsNil() {
- x.Urls = nil
- } else {
- yyv4 := &x.Urls
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- h.decSlicePtrtostring((*[]*string)(yyv4), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *UserEntityDescription) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj6 int
- var yyb6 bool
- var yyhl6 bool = l >= 0
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Urls = nil
- } else {
- yyv7 := &x.Urls
- yym8 := z.DecBinary()
- _ = yym8
- if false {
- } else {
- h.decSlicePtrtostring((*[]*string)(yyv7), d)
- }
- }
- for {
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj6-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *URL) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [3]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(3)
- } else {
- yynn2 = 3
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.ExpandedURL == nil {
- r.EncodeNil()
- } else {
- yy4 := *x.ExpandedURL
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy4))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("expanded_url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.ExpandedURL == nil {
- r.EncodeNil()
- } else {
- yy6 := *x.ExpandedURL
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy6))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Indices == nil {
- r.EncodeNil()
- } else {
- yym9 := z.EncBinary()
- _ = yym9
- if false {
- } else {
- z.F.EncSliceIntV(x.Indices, false, e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("indices"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Indices == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- z.F.EncSliceIntV(x.Indices, false, e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym12 := z.EncBinary()
- _ = yym12
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.URL))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.URL))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *URL) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *URL) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "expanded_url":
- if r.TryDecodeAsNil() {
- if x.ExpandedURL != nil {
- x.ExpandedURL = nil
- }
- } else {
- if x.ExpandedURL == nil {
- x.ExpandedURL = new(string)
- }
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- *((*string)(x.ExpandedURL)) = r.DecodeString()
- }
- }
- case "indices":
- if r.TryDecodeAsNil() {
- x.Indices = nil
- } else {
- yyv6 := &x.Indices
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- z.F.DecSliceIntX(yyv6, false, d)
- }
- }
- case "url":
- if r.TryDecodeAsNil() {
- x.URL = ""
- } else {
- yyv8 := &x.URL
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else {
- *((*string)(yyv8)) = r.DecodeString()
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *URL) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj10 int
- var yyb10 bool
- var yyhl10 bool = l >= 0
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.ExpandedURL != nil {
- x.ExpandedURL = nil
- }
- } else {
- if x.ExpandedURL == nil {
- x.ExpandedURL = new(string)
- }
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else {
- *((*string)(x.ExpandedURL)) = r.DecodeString()
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Indices = nil
- } else {
- yyv13 := &x.Indices
- yym14 := z.DecBinary()
- _ = yym14
- if false {
- } else {
- z.F.DecSliceIntX(yyv13, false, d)
- }
- }
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.URL = ""
- } else {
- yyv15 := &x.URL
- yym16 := z.DecBinary()
- _ = yym16
- if false {
- } else {
- *((*string)(yyv15)) = r.DecodeString()
- }
- }
- for {
- yyj10++
- if yyhl10 {
- yyb10 = yyj10 > l
- } else {
- yyb10 = r.CheckBreak()
- }
- if yyb10 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj10-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *UserEntityURL) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [1]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(1)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Urls == nil {
- r.EncodeNil()
- } else {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- h.encSliceURL(([]URL)(x.Urls), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("urls"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Urls == nil {
- r.EncodeNil()
- } else {
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- h.encSliceURL(([]URL)(x.Urls), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *UserEntityURL) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *UserEntityURL) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "urls":
- if r.TryDecodeAsNil() {
- x.Urls = nil
- } else {
- yyv4 := &x.Urls
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- h.decSliceURL((*[]URL)(yyv4), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *UserEntityURL) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj6 int
- var yyb6 bool
- var yyhl6 bool = l >= 0
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Urls = nil
- } else {
- yyv7 := &x.Urls
- yym8 := z.DecBinary()
- _ = yym8
- if false {
- } else {
- h.decSliceURL((*[]URL)(yyv7), d)
- }
- }
- for {
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj6-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *UserEntities) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [2]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(2)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy4 := &x.Description
- yy4.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("description"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy6 := &x.Description
- yy6.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy9 := &x.URL
- yy9.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy11 := &x.URL
- yy11.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *UserEntities) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *UserEntities) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "description":
- if r.TryDecodeAsNil() {
- x.Description = UserEntityDescription{}
- } else {
- yyv4 := &x.Description
- yyv4.CodecDecodeSelf(d)
- }
- case "url":
- if r.TryDecodeAsNil() {
- x.URL = UserEntityURL{}
- } else {
- yyv5 := &x.URL
- yyv5.CodecDecodeSelf(d)
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *UserEntities) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj6 int
- var yyb6 bool
- var yyhl6 bool = l >= 0
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Description = UserEntityDescription{}
- } else {
- yyv7 := &x.Description
- yyv7.CodecDecodeSelf(d)
- }
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.URL = UserEntityURL{}
- } else {
- yyv8 := &x.URL
- yyv8.CodecDecodeSelf(d)
- }
- for {
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj6-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *User) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [39]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(39)
- } else {
- yynn2 = 39
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- r.EncodeBool(bool(x.ContributorsEnabled))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("contributors_enabled"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeBool(bool(x.ContributorsEnabled))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.CreatedAt))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("created_at"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.CreatedAt))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- r.EncodeBool(bool(x.DefaultProfile))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("default_profile"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym11 := z.EncBinary()
- _ = yym11
- if false {
- } else {
- r.EncodeBool(bool(x.DefaultProfile))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym13 := z.EncBinary()
- _ = yym13
- if false {
- } else {
- r.EncodeBool(bool(x.DefaultProfileImage))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("default_profile_image"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym14 := z.EncBinary()
- _ = yym14
- if false {
- } else {
- r.EncodeBool(bool(x.DefaultProfileImage))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym16 := z.EncBinary()
- _ = yym16
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Description))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("description"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym17 := z.EncBinary()
- _ = yym17
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Description))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy19 := &x.Entities
- yy19.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("entities"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy21 := &x.Entities
- yy21.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym24 := z.EncBinary()
- _ = yym24
- if false {
- } else {
- r.EncodeInt(int64(x.FavouritesCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("favourites_count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym25 := z.EncBinary()
- _ = yym25
- if false {
- } else {
- r.EncodeInt(int64(x.FavouritesCount))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.FollowRequestSent == nil {
- r.EncodeNil()
- } else {
- yy27 := *x.FollowRequestSent
- yym28 := z.EncBinary()
- _ = yym28
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy27))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("follow_request_sent"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.FollowRequestSent == nil {
- r.EncodeNil()
- } else {
- yy29 := *x.FollowRequestSent
- yym30 := z.EncBinary()
- _ = yym30
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy29))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym32 := z.EncBinary()
- _ = yym32
- if false {
- } else {
- r.EncodeInt(int64(x.FollowersCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("followers_count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym33 := z.EncBinary()
- _ = yym33
- if false {
- } else {
- r.EncodeInt(int64(x.FollowersCount))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Following == nil {
- r.EncodeNil()
- } else {
- yy35 := *x.Following
- yym36 := z.EncBinary()
- _ = yym36
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy35))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("following"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Following == nil {
- r.EncodeNil()
- } else {
- yy37 := *x.Following
- yym38 := z.EncBinary()
- _ = yym38
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy37))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym40 := z.EncBinary()
- _ = yym40
- if false {
- } else {
- r.EncodeInt(int64(x.FriendsCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("friends_count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym41 := z.EncBinary()
- _ = yym41
- if false {
- } else {
- r.EncodeInt(int64(x.FriendsCount))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym43 := z.EncBinary()
- _ = yym43
- if false {
- } else {
- r.EncodeBool(bool(x.GeoEnabled))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("geo_enabled"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym44 := z.EncBinary()
- _ = yym44
- if false {
- } else {
- r.EncodeBool(bool(x.GeoEnabled))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym46 := z.EncBinary()
- _ = yym46
- if false {
- } else {
- r.EncodeInt(int64(x.ID))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("id"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym47 := z.EncBinary()
- _ = yym47
- if false {
- } else {
- r.EncodeInt(int64(x.ID))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym49 := z.EncBinary()
- _ = yym49
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.IDStr))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("id_str"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym50 := z.EncBinary()
- _ = yym50
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.IDStr))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym52 := z.EncBinary()
- _ = yym52
- if false {
- } else {
- r.EncodeBool(bool(x.IsTranslator))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("is_translator"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym53 := z.EncBinary()
- _ = yym53
- if false {
- } else {
- r.EncodeBool(bool(x.IsTranslator))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym55 := z.EncBinary()
- _ = yym55
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Lang))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("lang"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym56 := z.EncBinary()
- _ = yym56
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Lang))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym58 := z.EncBinary()
- _ = yym58
- if false {
- } else {
- r.EncodeInt(int64(x.ListedCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("listed_count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym59 := z.EncBinary()
- _ = yym59
- if false {
- } else {
- r.EncodeInt(int64(x.ListedCount))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym61 := z.EncBinary()
- _ = yym61
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Location))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("location"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym62 := z.EncBinary()
- _ = yym62
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Location))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym64 := z.EncBinary()
- _ = yym64
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Name))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("name"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym65 := z.EncBinary()
- _ = yym65
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Name))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Notifications == nil {
- r.EncodeNil()
- } else {
- yy67 := *x.Notifications
- yym68 := z.EncBinary()
- _ = yym68
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy67))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("notifications"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Notifications == nil {
- r.EncodeNil()
- } else {
- yy69 := *x.Notifications
- yym70 := z.EncBinary()
- _ = yym70
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy69))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym72 := z.EncBinary()
- _ = yym72
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundColor))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_background_color"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym73 := z.EncBinary()
- _ = yym73
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundColor))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym75 := z.EncBinary()
- _ = yym75
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundImageURL))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_background_image_url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym76 := z.EncBinary()
- _ = yym76
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundImageURL))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym78 := z.EncBinary()
- _ = yym78
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundImageURLHTTPS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_background_image_url_https"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym79 := z.EncBinary()
- _ = yym79
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileBackgroundImageURLHTTPS))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym81 := z.EncBinary()
- _ = yym81
- if false {
- } else {
- r.EncodeBool(bool(x.ProfileBackgroundTile))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_background_tile"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym82 := z.EncBinary()
- _ = yym82
- if false {
- } else {
- r.EncodeBool(bool(x.ProfileBackgroundTile))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym84 := z.EncBinary()
- _ = yym84
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileImageURL))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_image_url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym85 := z.EncBinary()
- _ = yym85
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileImageURL))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym87 := z.EncBinary()
- _ = yym87
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileImageURLHTTPS))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_image_url_https"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym88 := z.EncBinary()
- _ = yym88
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileImageURLHTTPS))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym90 := z.EncBinary()
- _ = yym90
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileLinkColor))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_link_color"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym91 := z.EncBinary()
- _ = yym91
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileLinkColor))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym93 := z.EncBinary()
- _ = yym93
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileSidebarBorderColor))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_sidebar_border_color"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym94 := z.EncBinary()
- _ = yym94
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileSidebarBorderColor))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym96 := z.EncBinary()
- _ = yym96
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileSidebarFillColor))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_sidebar_fill_color"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym97 := z.EncBinary()
- _ = yym97
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileSidebarFillColor))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym99 := z.EncBinary()
- _ = yym99
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileTextColor))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_text_color"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym100 := z.EncBinary()
- _ = yym100
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ProfileTextColor))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym102 := z.EncBinary()
- _ = yym102
- if false {
- } else {
- r.EncodeBool(bool(x.ProfileUseBackgroundImage))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("profile_use_background_image"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym103 := z.EncBinary()
- _ = yym103
- if false {
- } else {
- r.EncodeBool(bool(x.ProfileUseBackgroundImage))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym105 := z.EncBinary()
- _ = yym105
- if false {
- } else {
- r.EncodeBool(bool(x.Protected))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("protected"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym106 := z.EncBinary()
- _ = yym106
- if false {
- } else {
- r.EncodeBool(bool(x.Protected))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym108 := z.EncBinary()
- _ = yym108
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ScreenName))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("screen_name"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym109 := z.EncBinary()
- _ = yym109
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ScreenName))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym111 := z.EncBinary()
- _ = yym111
- if false {
- } else {
- r.EncodeBool(bool(x.ShowAllInlineMedia))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("show_all_inline_media"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym112 := z.EncBinary()
- _ = yym112
- if false {
- } else {
- r.EncodeBool(bool(x.ShowAllInlineMedia))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym114 := z.EncBinary()
- _ = yym114
- if false {
- } else {
- r.EncodeInt(int64(x.StatusesCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("statuses_count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym115 := z.EncBinary()
- _ = yym115
- if false {
- } else {
- r.EncodeInt(int64(x.StatusesCount))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym117 := z.EncBinary()
- _ = yym117
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.TimeZone))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("time_zone"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym118 := z.EncBinary()
- _ = yym118
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.TimeZone))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.URL == nil {
- r.EncodeNil()
- } else {
- yy120 := *x.URL
- yym121 := z.EncBinary()
- _ = yym121
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy120))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("url"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.URL == nil {
- r.EncodeNil()
- } else {
- yy122 := *x.URL
- yym123 := z.EncBinary()
- _ = yym123
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy122))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym125 := z.EncBinary()
- _ = yym125
- if false {
- } else {
- r.EncodeInt(int64(x.UtcOffset))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("utc_offset"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym126 := z.EncBinary()
- _ = yym126
- if false {
- } else {
- r.EncodeInt(int64(x.UtcOffset))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym128 := z.EncBinary()
- _ = yym128
- if false {
- } else {
- r.EncodeBool(bool(x.Verified))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("verified"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym129 := z.EncBinary()
- _ = yym129
- if false {
- } else {
- r.EncodeBool(bool(x.Verified))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *User) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *User) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "contributors_enabled":
- if r.TryDecodeAsNil() {
- x.ContributorsEnabled = false
- } else {
- yyv4 := &x.ContributorsEnabled
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- *((*bool)(yyv4)) = r.DecodeBool()
- }
- }
- case "created_at":
- if r.TryDecodeAsNil() {
- x.CreatedAt = ""
- } else {
- yyv6 := &x.CreatedAt
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- *((*string)(yyv6)) = r.DecodeString()
- }
- }
- case "default_profile":
- if r.TryDecodeAsNil() {
- x.DefaultProfile = false
- } else {
- yyv8 := &x.DefaultProfile
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else {
- *((*bool)(yyv8)) = r.DecodeBool()
- }
- }
- case "default_profile_image":
- if r.TryDecodeAsNil() {
- x.DefaultProfileImage = false
- } else {
- yyv10 := &x.DefaultProfileImage
- yym11 := z.DecBinary()
- _ = yym11
- if false {
- } else {
- *((*bool)(yyv10)) = r.DecodeBool()
- }
- }
- case "description":
- if r.TryDecodeAsNil() {
- x.Description = ""
- } else {
- yyv12 := &x.Description
- yym13 := z.DecBinary()
- _ = yym13
- if false {
- } else {
- *((*string)(yyv12)) = r.DecodeString()
- }
- }
- case "entities":
- if r.TryDecodeAsNil() {
- x.Entities = UserEntities{}
- } else {
- yyv14 := &x.Entities
- yyv14.CodecDecodeSelf(d)
- }
- case "favourites_count":
- if r.TryDecodeAsNil() {
- x.FavouritesCount = 0
- } else {
- yyv15 := &x.FavouritesCount
- yym16 := z.DecBinary()
- _ = yym16
- if false {
- } else {
- *((*int)(yyv15)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "follow_request_sent":
- if r.TryDecodeAsNil() {
- if x.FollowRequestSent != nil {
- x.FollowRequestSent = nil
- }
- } else {
- if x.FollowRequestSent == nil {
- x.FollowRequestSent = new(string)
- }
- yym18 := z.DecBinary()
- _ = yym18
- if false {
- } else {
- *((*string)(x.FollowRequestSent)) = r.DecodeString()
- }
- }
- case "followers_count":
- if r.TryDecodeAsNil() {
- x.FollowersCount = 0
- } else {
- yyv19 := &x.FollowersCount
- yym20 := z.DecBinary()
- _ = yym20
- if false {
- } else {
- *((*int)(yyv19)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "following":
- if r.TryDecodeAsNil() {
- if x.Following != nil {
- x.Following = nil
- }
- } else {
- if x.Following == nil {
- x.Following = new(string)
- }
- yym22 := z.DecBinary()
- _ = yym22
- if false {
- } else {
- *((*string)(x.Following)) = r.DecodeString()
- }
- }
- case "friends_count":
- if r.TryDecodeAsNil() {
- x.FriendsCount = 0
- } else {
- yyv23 := &x.FriendsCount
- yym24 := z.DecBinary()
- _ = yym24
- if false {
- } else {
- *((*int)(yyv23)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "geo_enabled":
- if r.TryDecodeAsNil() {
- x.GeoEnabled = false
- } else {
- yyv25 := &x.GeoEnabled
- yym26 := z.DecBinary()
- _ = yym26
- if false {
- } else {
- *((*bool)(yyv25)) = r.DecodeBool()
- }
- }
- case "id":
- if r.TryDecodeAsNil() {
- x.ID = 0
- } else {
- yyv27 := &x.ID
- yym28 := z.DecBinary()
- _ = yym28
- if false {
- } else {
- *((*int)(yyv27)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "id_str":
- if r.TryDecodeAsNil() {
- x.IDStr = ""
- } else {
- yyv29 := &x.IDStr
- yym30 := z.DecBinary()
- _ = yym30
- if false {
- } else {
- *((*string)(yyv29)) = r.DecodeString()
- }
- }
- case "is_translator":
- if r.TryDecodeAsNil() {
- x.IsTranslator = false
- } else {
- yyv31 := &x.IsTranslator
- yym32 := z.DecBinary()
- _ = yym32
- if false {
- } else {
- *((*bool)(yyv31)) = r.DecodeBool()
- }
- }
- case "lang":
- if r.TryDecodeAsNil() {
- x.Lang = ""
- } else {
- yyv33 := &x.Lang
- yym34 := z.DecBinary()
- _ = yym34
- if false {
- } else {
- *((*string)(yyv33)) = r.DecodeString()
- }
- }
- case "listed_count":
- if r.TryDecodeAsNil() {
- x.ListedCount = 0
- } else {
- yyv35 := &x.ListedCount
- yym36 := z.DecBinary()
- _ = yym36
- if false {
- } else {
- *((*int)(yyv35)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "location":
- if r.TryDecodeAsNil() {
- x.Location = ""
- } else {
- yyv37 := &x.Location
- yym38 := z.DecBinary()
- _ = yym38
- if false {
- } else {
- *((*string)(yyv37)) = r.DecodeString()
- }
- }
- case "name":
- if r.TryDecodeAsNil() {
- x.Name = ""
- } else {
- yyv39 := &x.Name
- yym40 := z.DecBinary()
- _ = yym40
- if false {
- } else {
- *((*string)(yyv39)) = r.DecodeString()
- }
- }
- case "notifications":
- if r.TryDecodeAsNil() {
- if x.Notifications != nil {
- x.Notifications = nil
- }
- } else {
- if x.Notifications == nil {
- x.Notifications = new(string)
- }
- yym42 := z.DecBinary()
- _ = yym42
- if false {
- } else {
- *((*string)(x.Notifications)) = r.DecodeString()
- }
- }
- case "profile_background_color":
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundColor = ""
- } else {
- yyv43 := &x.ProfileBackgroundColor
- yym44 := z.DecBinary()
- _ = yym44
- if false {
- } else {
- *((*string)(yyv43)) = r.DecodeString()
- }
- }
- case "profile_background_image_url":
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundImageURL = ""
- } else {
- yyv45 := &x.ProfileBackgroundImageURL
- yym46 := z.DecBinary()
- _ = yym46
- if false {
- } else {
- *((*string)(yyv45)) = r.DecodeString()
- }
- }
- case "profile_background_image_url_https":
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundImageURLHTTPS = ""
- } else {
- yyv47 := &x.ProfileBackgroundImageURLHTTPS
- yym48 := z.DecBinary()
- _ = yym48
- if false {
- } else {
- *((*string)(yyv47)) = r.DecodeString()
- }
- }
- case "profile_background_tile":
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundTile = false
- } else {
- yyv49 := &x.ProfileBackgroundTile
- yym50 := z.DecBinary()
- _ = yym50
- if false {
- } else {
- *((*bool)(yyv49)) = r.DecodeBool()
- }
- }
- case "profile_image_url":
- if r.TryDecodeAsNil() {
- x.ProfileImageURL = ""
- } else {
- yyv51 := &x.ProfileImageURL
- yym52 := z.DecBinary()
- _ = yym52
- if false {
- } else {
- *((*string)(yyv51)) = r.DecodeString()
- }
- }
- case "profile_image_url_https":
- if r.TryDecodeAsNil() {
- x.ProfileImageURLHTTPS = ""
- } else {
- yyv53 := &x.ProfileImageURLHTTPS
- yym54 := z.DecBinary()
- _ = yym54
- if false {
- } else {
- *((*string)(yyv53)) = r.DecodeString()
- }
- }
- case "profile_link_color":
- if r.TryDecodeAsNil() {
- x.ProfileLinkColor = ""
- } else {
- yyv55 := &x.ProfileLinkColor
- yym56 := z.DecBinary()
- _ = yym56
- if false {
- } else {
- *((*string)(yyv55)) = r.DecodeString()
- }
- }
- case "profile_sidebar_border_color":
- if r.TryDecodeAsNil() {
- x.ProfileSidebarBorderColor = ""
- } else {
- yyv57 := &x.ProfileSidebarBorderColor
- yym58 := z.DecBinary()
- _ = yym58
- if false {
- } else {
- *((*string)(yyv57)) = r.DecodeString()
- }
- }
- case "profile_sidebar_fill_color":
- if r.TryDecodeAsNil() {
- x.ProfileSidebarFillColor = ""
- } else {
- yyv59 := &x.ProfileSidebarFillColor
- yym60 := z.DecBinary()
- _ = yym60
- if false {
- } else {
- *((*string)(yyv59)) = r.DecodeString()
- }
- }
- case "profile_text_color":
- if r.TryDecodeAsNil() {
- x.ProfileTextColor = ""
- } else {
- yyv61 := &x.ProfileTextColor
- yym62 := z.DecBinary()
- _ = yym62
- if false {
- } else {
- *((*string)(yyv61)) = r.DecodeString()
- }
- }
- case "profile_use_background_image":
- if r.TryDecodeAsNil() {
- x.ProfileUseBackgroundImage = false
- } else {
- yyv63 := &x.ProfileUseBackgroundImage
- yym64 := z.DecBinary()
- _ = yym64
- if false {
- } else {
- *((*bool)(yyv63)) = r.DecodeBool()
- }
- }
- case "protected":
- if r.TryDecodeAsNil() {
- x.Protected = false
- } else {
- yyv65 := &x.Protected
- yym66 := z.DecBinary()
- _ = yym66
- if false {
- } else {
- *((*bool)(yyv65)) = r.DecodeBool()
- }
- }
- case "screen_name":
- if r.TryDecodeAsNil() {
- x.ScreenName = ""
- } else {
- yyv67 := &x.ScreenName
- yym68 := z.DecBinary()
- _ = yym68
- if false {
- } else {
- *((*string)(yyv67)) = r.DecodeString()
- }
- }
- case "show_all_inline_media":
- if r.TryDecodeAsNil() {
- x.ShowAllInlineMedia = false
- } else {
- yyv69 := &x.ShowAllInlineMedia
- yym70 := z.DecBinary()
- _ = yym70
- if false {
- } else {
- *((*bool)(yyv69)) = r.DecodeBool()
- }
- }
- case "statuses_count":
- if r.TryDecodeAsNil() {
- x.StatusesCount = 0
- } else {
- yyv71 := &x.StatusesCount
- yym72 := z.DecBinary()
- _ = yym72
- if false {
- } else {
- *((*int)(yyv71)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "time_zone":
- if r.TryDecodeAsNil() {
- x.TimeZone = ""
- } else {
- yyv73 := &x.TimeZone
- yym74 := z.DecBinary()
- _ = yym74
- if false {
- } else {
- *((*string)(yyv73)) = r.DecodeString()
- }
- }
- case "url":
- if r.TryDecodeAsNil() {
- if x.URL != nil {
- x.URL = nil
- }
- } else {
- if x.URL == nil {
- x.URL = new(string)
- }
- yym76 := z.DecBinary()
- _ = yym76
- if false {
- } else {
- *((*string)(x.URL)) = r.DecodeString()
- }
- }
- case "utc_offset":
- if r.TryDecodeAsNil() {
- x.UtcOffset = 0
- } else {
- yyv77 := &x.UtcOffset
- yym78 := z.DecBinary()
- _ = yym78
- if false {
- } else {
- *((*int)(yyv77)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "verified":
- if r.TryDecodeAsNil() {
- x.Verified = false
- } else {
- yyv79 := &x.Verified
- yym80 := z.DecBinary()
- _ = yym80
- if false {
- } else {
- *((*bool)(yyv79)) = r.DecodeBool()
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *User) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj81 int
- var yyb81 bool
- var yyhl81 bool = l >= 0
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ContributorsEnabled = false
- } else {
- yyv82 := &x.ContributorsEnabled
- yym83 := z.DecBinary()
- _ = yym83
- if false {
- } else {
- *((*bool)(yyv82)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.CreatedAt = ""
- } else {
- yyv84 := &x.CreatedAt
- yym85 := z.DecBinary()
- _ = yym85
- if false {
- } else {
- *((*string)(yyv84)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.DefaultProfile = false
- } else {
- yyv86 := &x.DefaultProfile
- yym87 := z.DecBinary()
- _ = yym87
- if false {
- } else {
- *((*bool)(yyv86)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.DefaultProfileImage = false
- } else {
- yyv88 := &x.DefaultProfileImage
- yym89 := z.DecBinary()
- _ = yym89
- if false {
- } else {
- *((*bool)(yyv88)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Description = ""
- } else {
- yyv90 := &x.Description
- yym91 := z.DecBinary()
- _ = yym91
- if false {
- } else {
- *((*string)(yyv90)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Entities = UserEntities{}
- } else {
- yyv92 := &x.Entities
- yyv92.CodecDecodeSelf(d)
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.FavouritesCount = 0
- } else {
- yyv93 := &x.FavouritesCount
- yym94 := z.DecBinary()
- _ = yym94
- if false {
- } else {
- *((*int)(yyv93)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.FollowRequestSent != nil {
- x.FollowRequestSent = nil
- }
- } else {
- if x.FollowRequestSent == nil {
- x.FollowRequestSent = new(string)
- }
- yym96 := z.DecBinary()
- _ = yym96
- if false {
- } else {
- *((*string)(x.FollowRequestSent)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.FollowersCount = 0
- } else {
- yyv97 := &x.FollowersCount
- yym98 := z.DecBinary()
- _ = yym98
- if false {
- } else {
- *((*int)(yyv97)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.Following != nil {
- x.Following = nil
- }
- } else {
- if x.Following == nil {
- x.Following = new(string)
- }
- yym100 := z.DecBinary()
- _ = yym100
- if false {
- } else {
- *((*string)(x.Following)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.FriendsCount = 0
- } else {
- yyv101 := &x.FriendsCount
- yym102 := z.DecBinary()
- _ = yym102
- if false {
- } else {
- *((*int)(yyv101)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.GeoEnabled = false
- } else {
- yyv103 := &x.GeoEnabled
- yym104 := z.DecBinary()
- _ = yym104
- if false {
- } else {
- *((*bool)(yyv103)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ID = 0
- } else {
- yyv105 := &x.ID
- yym106 := z.DecBinary()
- _ = yym106
- if false {
- } else {
- *((*int)(yyv105)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.IDStr = ""
- } else {
- yyv107 := &x.IDStr
- yym108 := z.DecBinary()
- _ = yym108
- if false {
- } else {
- *((*string)(yyv107)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.IsTranslator = false
- } else {
- yyv109 := &x.IsTranslator
- yym110 := z.DecBinary()
- _ = yym110
- if false {
- } else {
- *((*bool)(yyv109)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Lang = ""
- } else {
- yyv111 := &x.Lang
- yym112 := z.DecBinary()
- _ = yym112
- if false {
- } else {
- *((*string)(yyv111)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ListedCount = 0
- } else {
- yyv113 := &x.ListedCount
- yym114 := z.DecBinary()
- _ = yym114
- if false {
- } else {
- *((*int)(yyv113)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Location = ""
- } else {
- yyv115 := &x.Location
- yym116 := z.DecBinary()
- _ = yym116
- if false {
- } else {
- *((*string)(yyv115)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Name = ""
- } else {
- yyv117 := &x.Name
- yym118 := z.DecBinary()
- _ = yym118
- if false {
- } else {
- *((*string)(yyv117)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.Notifications != nil {
- x.Notifications = nil
- }
- } else {
- if x.Notifications == nil {
- x.Notifications = new(string)
- }
- yym120 := z.DecBinary()
- _ = yym120
- if false {
- } else {
- *((*string)(x.Notifications)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundColor = ""
- } else {
- yyv121 := &x.ProfileBackgroundColor
- yym122 := z.DecBinary()
- _ = yym122
- if false {
- } else {
- *((*string)(yyv121)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundImageURL = ""
- } else {
- yyv123 := &x.ProfileBackgroundImageURL
- yym124 := z.DecBinary()
- _ = yym124
- if false {
- } else {
- *((*string)(yyv123)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundImageURLHTTPS = ""
- } else {
- yyv125 := &x.ProfileBackgroundImageURLHTTPS
- yym126 := z.DecBinary()
- _ = yym126
- if false {
- } else {
- *((*string)(yyv125)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileBackgroundTile = false
- } else {
- yyv127 := &x.ProfileBackgroundTile
- yym128 := z.DecBinary()
- _ = yym128
- if false {
- } else {
- *((*bool)(yyv127)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileImageURL = ""
- } else {
- yyv129 := &x.ProfileImageURL
- yym130 := z.DecBinary()
- _ = yym130
- if false {
- } else {
- *((*string)(yyv129)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileImageURLHTTPS = ""
- } else {
- yyv131 := &x.ProfileImageURLHTTPS
- yym132 := z.DecBinary()
- _ = yym132
- if false {
- } else {
- *((*string)(yyv131)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileLinkColor = ""
- } else {
- yyv133 := &x.ProfileLinkColor
- yym134 := z.DecBinary()
- _ = yym134
- if false {
- } else {
- *((*string)(yyv133)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileSidebarBorderColor = ""
- } else {
- yyv135 := &x.ProfileSidebarBorderColor
- yym136 := z.DecBinary()
- _ = yym136
- if false {
- } else {
- *((*string)(yyv135)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileSidebarFillColor = ""
- } else {
- yyv137 := &x.ProfileSidebarFillColor
- yym138 := z.DecBinary()
- _ = yym138
- if false {
- } else {
- *((*string)(yyv137)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileTextColor = ""
- } else {
- yyv139 := &x.ProfileTextColor
- yym140 := z.DecBinary()
- _ = yym140
- if false {
- } else {
- *((*string)(yyv139)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ProfileUseBackgroundImage = false
- } else {
- yyv141 := &x.ProfileUseBackgroundImage
- yym142 := z.DecBinary()
- _ = yym142
- if false {
- } else {
- *((*bool)(yyv141)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Protected = false
- } else {
- yyv143 := &x.Protected
- yym144 := z.DecBinary()
- _ = yym144
- if false {
- } else {
- *((*bool)(yyv143)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ScreenName = ""
- } else {
- yyv145 := &x.ScreenName
- yym146 := z.DecBinary()
- _ = yym146
- if false {
- } else {
- *((*string)(yyv145)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ShowAllInlineMedia = false
- } else {
- yyv147 := &x.ShowAllInlineMedia
- yym148 := z.DecBinary()
- _ = yym148
- if false {
- } else {
- *((*bool)(yyv147)) = r.DecodeBool()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.StatusesCount = 0
- } else {
- yyv149 := &x.StatusesCount
- yym150 := z.DecBinary()
- _ = yym150
- if false {
- } else {
- *((*int)(yyv149)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.TimeZone = ""
- } else {
- yyv151 := &x.TimeZone
- yym152 := z.DecBinary()
- _ = yym152
- if false {
- } else {
- *((*string)(yyv151)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.URL != nil {
- x.URL = nil
- }
- } else {
- if x.URL == nil {
- x.URL = new(string)
- }
- yym154 := z.DecBinary()
- _ = yym154
- if false {
- } else {
- *((*string)(x.URL)) = r.DecodeString()
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.UtcOffset = 0
- } else {
- yyv155 := &x.UtcOffset
- yym156 := z.DecBinary()
- _ = yym156
- if false {
- } else {
- *((*int)(yyv155)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Verified = false
- } else {
- yyv157 := &x.Verified
- yym158 := z.DecBinary()
- _ = yym158
- if false {
- } else {
- *((*bool)(yyv157)) = r.DecodeBool()
- }
- }
- for {
- yyj81++
- if yyhl81 {
- yyb81 = yyj81 > l
- } else {
- yyb81 = r.CheckBreak()
- }
- if yyb81 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj81-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *StatusMetadata) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [2]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(2)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.IsoLanguageCode))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("iso_language_code"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.IsoLanguageCode))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ResultType))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("result_type"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym8 := z.EncBinary()
- _ = yym8
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.ResultType))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *StatusMetadata) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *StatusMetadata) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "iso_language_code":
- if r.TryDecodeAsNil() {
- x.IsoLanguageCode = ""
- } else {
- yyv4 := &x.IsoLanguageCode
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- *((*string)(yyv4)) = r.DecodeString()
- }
- }
- case "result_type":
- if r.TryDecodeAsNil() {
- x.ResultType = ""
- } else {
- yyv6 := &x.ResultType
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- *((*string)(yyv6)) = r.DecodeString()
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *StatusMetadata) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj8 int
- var yyb8 bool
- var yyhl8 bool = l >= 0
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.IsoLanguageCode = ""
- } else {
- yyv9 := &x.IsoLanguageCode
- yym10 := z.DecBinary()
- _ = yym10
- if false {
- } else {
- *((*string)(yyv9)) = r.DecodeString()
- }
- }
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ResultType = ""
- } else {
- yyv11 := &x.ResultType
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else {
- *((*string)(yyv11)) = r.DecodeString()
- }
- }
- for {
- yyj8++
- if yyhl8 {
- yyb8 = yyj8 > l
- } else {
- yyb8 = r.CheckBreak()
- }
- if yyb8 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj8-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *Status) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [21]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(21)
- } else {
- yynn2 = 21
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Contributors == nil {
- r.EncodeNil()
- } else {
- yy4 := *x.Contributors
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy4))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("contributors"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Contributors == nil {
- r.EncodeNil()
- } else {
- yy6 := *x.Contributors
- yym7 := z.EncBinary()
- _ = yym7
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy6))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Coordinates == nil {
- r.EncodeNil()
- } else {
- yy9 := *x.Coordinates
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy9))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("coordinates"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Coordinates == nil {
- r.EncodeNil()
- } else {
- yy11 := *x.Coordinates
- yym12 := z.EncBinary()
- _ = yym12
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy11))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym14 := z.EncBinary()
- _ = yym14
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.CreatedAt))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("created_at"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym15 := z.EncBinary()
- _ = yym15
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.CreatedAt))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy17 := &x.Entities
- yy17.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("entities"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy19 := &x.Entities
- yy19.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym22 := z.EncBinary()
- _ = yym22
- if false {
- } else {
- r.EncodeBool(bool(x.Favorited))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("favorited"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym23 := z.EncBinary()
- _ = yym23
- if false {
- } else {
- r.EncodeBool(bool(x.Favorited))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Geo == nil {
- r.EncodeNil()
- } else {
- yy25 := *x.Geo
- yym26 := z.EncBinary()
- _ = yym26
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy25))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("geo"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Geo == nil {
- r.EncodeNil()
- } else {
- yy27 := *x.Geo
- yym28 := z.EncBinary()
- _ = yym28
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy27))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym30 := z.EncBinary()
- _ = yym30
- if false {
- } else {
- r.EncodeInt(int64(x.ID))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("id"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym31 := z.EncBinary()
- _ = yym31
- if false {
- } else {
- r.EncodeInt(int64(x.ID))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym33 := z.EncBinary()
- _ = yym33
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.IDStr))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("id_str"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym34 := z.EncBinary()
- _ = yym34
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.IDStr))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.InReplyToScreenName == nil {
- r.EncodeNil()
- } else {
- yy36 := *x.InReplyToScreenName
- yym37 := z.EncBinary()
- _ = yym37
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy36))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_screen_name"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.InReplyToScreenName == nil {
- r.EncodeNil()
- } else {
- yy38 := *x.InReplyToScreenName
- yym39 := z.EncBinary()
- _ = yym39
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy38))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.InReplyToStatusID == nil {
- r.EncodeNil()
- } else {
- yy41 := *x.InReplyToStatusID
- yym42 := z.EncBinary()
- _ = yym42
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy41))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_status_id"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.InReplyToStatusID == nil {
- r.EncodeNil()
- } else {
- yy43 := *x.InReplyToStatusID
- yym44 := z.EncBinary()
- _ = yym44
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy43))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.InReplyToStatusIDStr == nil {
- r.EncodeNil()
- } else {
- yy46 := *x.InReplyToStatusIDStr
- yym47 := z.EncBinary()
- _ = yym47
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy46))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_status_id_str"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.InReplyToStatusIDStr == nil {
- r.EncodeNil()
- } else {
- yy48 := *x.InReplyToStatusIDStr
- yym49 := z.EncBinary()
- _ = yym49
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy48))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.InReplyToUserID == nil {
- r.EncodeNil()
- } else {
- yy51 := *x.InReplyToUserID
- yym52 := z.EncBinary()
- _ = yym52
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy51))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_user_id"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.InReplyToUserID == nil {
- r.EncodeNil()
- } else {
- yy53 := *x.InReplyToUserID
- yym54 := z.EncBinary()
- _ = yym54
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy53))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.InReplyToUserIDStr == nil {
- r.EncodeNil()
- } else {
- yy56 := *x.InReplyToUserIDStr
- yym57 := z.EncBinary()
- _ = yym57
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy56))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("in_reply_to_user_id_str"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.InReplyToUserIDStr == nil {
- r.EncodeNil()
- } else {
- yy58 := *x.InReplyToUserIDStr
- yym59 := z.EncBinary()
- _ = yym59
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy58))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy61 := &x.Metadata
- yy61.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy63 := &x.Metadata
- yy63.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Place == nil {
- r.EncodeNil()
- } else {
- yy66 := *x.Place
- yym67 := z.EncBinary()
- _ = yym67
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy66))
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("place"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Place == nil {
- r.EncodeNil()
- } else {
- yy68 := *x.Place
- yym69 := z.EncBinary()
- _ = yym69
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy68))
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym71 := z.EncBinary()
- _ = yym71
- if false {
- } else {
- r.EncodeInt(int64(x.RetweetCount))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("retweet_count"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym72 := z.EncBinary()
- _ = yym72
- if false {
- } else {
- r.EncodeInt(int64(x.RetweetCount))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym74 := z.EncBinary()
- _ = yym74
- if false {
- } else {
- r.EncodeBool(bool(x.Retweeted))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("retweeted"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym75 := z.EncBinary()
- _ = yym75
- if false {
- } else {
- r.EncodeBool(bool(x.Retweeted))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym77 := z.EncBinary()
- _ = yym77
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Source))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("source"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym78 := z.EncBinary()
- _ = yym78
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Source))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym80 := z.EncBinary()
- _ = yym80
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Text))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("text"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym81 := z.EncBinary()
- _ = yym81
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(x.Text))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yym83 := z.EncBinary()
- _ = yym83
- if false {
- } else {
- r.EncodeBool(bool(x.Truncated))
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("truncated"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yym84 := z.EncBinary()
- _ = yym84
- if false {
- } else {
- r.EncodeBool(bool(x.Truncated))
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy86 := &x.User
- yy86.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("user"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy88 := &x.User
- yy88.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *Status) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *Status) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "contributors":
- if r.TryDecodeAsNil() {
- if x.Contributors != nil {
- x.Contributors = nil
- }
- } else {
- if x.Contributors == nil {
- x.Contributors = new(string)
- }
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- *((*string)(x.Contributors)) = r.DecodeString()
- }
- }
- case "coordinates":
- if r.TryDecodeAsNil() {
- if x.Coordinates != nil {
- x.Coordinates = nil
- }
- } else {
- if x.Coordinates == nil {
- x.Coordinates = new(string)
- }
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- *((*string)(x.Coordinates)) = r.DecodeString()
- }
- }
- case "created_at":
- if r.TryDecodeAsNil() {
- x.CreatedAt = ""
- } else {
- yyv8 := &x.CreatedAt
- yym9 := z.DecBinary()
- _ = yym9
- if false {
- } else {
- *((*string)(yyv8)) = r.DecodeString()
- }
- }
- case "entities":
- if r.TryDecodeAsNil() {
- x.Entities = Entities{}
- } else {
- yyv10 := &x.Entities
- yyv10.CodecDecodeSelf(d)
- }
- case "favorited":
- if r.TryDecodeAsNil() {
- x.Favorited = false
- } else {
- yyv11 := &x.Favorited
- yym12 := z.DecBinary()
- _ = yym12
- if false {
- } else {
- *((*bool)(yyv11)) = r.DecodeBool()
- }
- }
- case "geo":
- if r.TryDecodeAsNil() {
- if x.Geo != nil {
- x.Geo = nil
- }
- } else {
- if x.Geo == nil {
- x.Geo = new(string)
- }
- yym14 := z.DecBinary()
- _ = yym14
- if false {
- } else {
- *((*string)(x.Geo)) = r.DecodeString()
- }
- }
- case "id":
- if r.TryDecodeAsNil() {
- x.ID = 0
- } else {
- yyv15 := &x.ID
- yym16 := z.DecBinary()
- _ = yym16
- if false {
- } else {
- *((*int64)(yyv15)) = int64(r.DecodeInt(64))
- }
- }
- case "id_str":
- if r.TryDecodeAsNil() {
- x.IDStr = ""
- } else {
- yyv17 := &x.IDStr
- yym18 := z.DecBinary()
- _ = yym18
- if false {
- } else {
- *((*string)(yyv17)) = r.DecodeString()
- }
- }
- case "in_reply_to_screen_name":
- if r.TryDecodeAsNil() {
- if x.InReplyToScreenName != nil {
- x.InReplyToScreenName = nil
- }
- } else {
- if x.InReplyToScreenName == nil {
- x.InReplyToScreenName = new(string)
- }
- yym20 := z.DecBinary()
- _ = yym20
- if false {
- } else {
- *((*string)(x.InReplyToScreenName)) = r.DecodeString()
- }
- }
- case "in_reply_to_status_id":
- if r.TryDecodeAsNil() {
- if x.InReplyToStatusID != nil {
- x.InReplyToStatusID = nil
- }
- } else {
- if x.InReplyToStatusID == nil {
- x.InReplyToStatusID = new(string)
- }
- yym22 := z.DecBinary()
- _ = yym22
- if false {
- } else {
- *((*string)(x.InReplyToStatusID)) = r.DecodeString()
- }
- }
- case "in_reply_to_status_id_str":
- if r.TryDecodeAsNil() {
- if x.InReplyToStatusIDStr != nil {
- x.InReplyToStatusIDStr = nil
- }
- } else {
- if x.InReplyToStatusIDStr == nil {
- x.InReplyToStatusIDStr = new(string)
- }
- yym24 := z.DecBinary()
- _ = yym24
- if false {
- } else {
- *((*string)(x.InReplyToStatusIDStr)) = r.DecodeString()
- }
- }
- case "in_reply_to_user_id":
- if r.TryDecodeAsNil() {
- if x.InReplyToUserID != nil {
- x.InReplyToUserID = nil
- }
- } else {
- if x.InReplyToUserID == nil {
- x.InReplyToUserID = new(string)
- }
- yym26 := z.DecBinary()
- _ = yym26
- if false {
- } else {
- *((*string)(x.InReplyToUserID)) = r.DecodeString()
- }
- }
- case "in_reply_to_user_id_str":
- if r.TryDecodeAsNil() {
- if x.InReplyToUserIDStr != nil {
- x.InReplyToUserIDStr = nil
- }
- } else {
- if x.InReplyToUserIDStr == nil {
- x.InReplyToUserIDStr = new(string)
- }
- yym28 := z.DecBinary()
- _ = yym28
- if false {
- } else {
- *((*string)(x.InReplyToUserIDStr)) = r.DecodeString()
- }
- }
- case "metadata":
- if r.TryDecodeAsNil() {
- x.Metadata = StatusMetadata{}
- } else {
- yyv29 := &x.Metadata
- yyv29.CodecDecodeSelf(d)
- }
- case "place":
- if r.TryDecodeAsNil() {
- if x.Place != nil {
- x.Place = nil
- }
- } else {
- if x.Place == nil {
- x.Place = new(string)
- }
- yym31 := z.DecBinary()
- _ = yym31
- if false {
- } else {
- *((*string)(x.Place)) = r.DecodeString()
- }
- }
- case "retweet_count":
- if r.TryDecodeAsNil() {
- x.RetweetCount = 0
- } else {
- yyv32 := &x.RetweetCount
- yym33 := z.DecBinary()
- _ = yym33
- if false {
- } else {
- *((*int)(yyv32)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- case "retweeted":
- if r.TryDecodeAsNil() {
- x.Retweeted = false
- } else {
- yyv34 := &x.Retweeted
- yym35 := z.DecBinary()
- _ = yym35
- if false {
- } else {
- *((*bool)(yyv34)) = r.DecodeBool()
- }
- }
- case "source":
- if r.TryDecodeAsNil() {
- x.Source = ""
- } else {
- yyv36 := &x.Source
- yym37 := z.DecBinary()
- _ = yym37
- if false {
- } else {
- *((*string)(yyv36)) = r.DecodeString()
- }
- }
- case "text":
- if r.TryDecodeAsNil() {
- x.Text = ""
- } else {
- yyv38 := &x.Text
- yym39 := z.DecBinary()
- _ = yym39
- if false {
- } else {
- *((*string)(yyv38)) = r.DecodeString()
- }
- }
- case "truncated":
- if r.TryDecodeAsNil() {
- x.Truncated = false
- } else {
- yyv40 := &x.Truncated
- yym41 := z.DecBinary()
- _ = yym41
- if false {
- } else {
- *((*bool)(yyv40)) = r.DecodeBool()
- }
- }
- case "user":
- if r.TryDecodeAsNil() {
- x.User = User{}
- } else {
- yyv42 := &x.User
- yyv42.CodecDecodeSelf(d)
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *Status) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj43 int
- var yyb43 bool
- var yyhl43 bool = l >= 0
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.Contributors != nil {
- x.Contributors = nil
- }
- } else {
- if x.Contributors == nil {
- x.Contributors = new(string)
- }
- yym45 := z.DecBinary()
- _ = yym45
- if false {
- } else {
- *((*string)(x.Contributors)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.Coordinates != nil {
- x.Coordinates = nil
- }
- } else {
- if x.Coordinates == nil {
- x.Coordinates = new(string)
- }
- yym47 := z.DecBinary()
- _ = yym47
- if false {
- } else {
- *((*string)(x.Coordinates)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.CreatedAt = ""
- } else {
- yyv48 := &x.CreatedAt
- yym49 := z.DecBinary()
- _ = yym49
- if false {
- } else {
- *((*string)(yyv48)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Entities = Entities{}
- } else {
- yyv50 := &x.Entities
- yyv50.CodecDecodeSelf(d)
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Favorited = false
- } else {
- yyv51 := &x.Favorited
- yym52 := z.DecBinary()
- _ = yym52
- if false {
- } else {
- *((*bool)(yyv51)) = r.DecodeBool()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.Geo != nil {
- x.Geo = nil
- }
- } else {
- if x.Geo == nil {
- x.Geo = new(string)
- }
- yym54 := z.DecBinary()
- _ = yym54
- if false {
- } else {
- *((*string)(x.Geo)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.ID = 0
- } else {
- yyv55 := &x.ID
- yym56 := z.DecBinary()
- _ = yym56
- if false {
- } else {
- *((*int64)(yyv55)) = int64(r.DecodeInt(64))
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.IDStr = ""
- } else {
- yyv57 := &x.IDStr
- yym58 := z.DecBinary()
- _ = yym58
- if false {
- } else {
- *((*string)(yyv57)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.InReplyToScreenName != nil {
- x.InReplyToScreenName = nil
- }
- } else {
- if x.InReplyToScreenName == nil {
- x.InReplyToScreenName = new(string)
- }
- yym60 := z.DecBinary()
- _ = yym60
- if false {
- } else {
- *((*string)(x.InReplyToScreenName)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.InReplyToStatusID != nil {
- x.InReplyToStatusID = nil
- }
- } else {
- if x.InReplyToStatusID == nil {
- x.InReplyToStatusID = new(string)
- }
- yym62 := z.DecBinary()
- _ = yym62
- if false {
- } else {
- *((*string)(x.InReplyToStatusID)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.InReplyToStatusIDStr != nil {
- x.InReplyToStatusIDStr = nil
- }
- } else {
- if x.InReplyToStatusIDStr == nil {
- x.InReplyToStatusIDStr = new(string)
- }
- yym64 := z.DecBinary()
- _ = yym64
- if false {
- } else {
- *((*string)(x.InReplyToStatusIDStr)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.InReplyToUserID != nil {
- x.InReplyToUserID = nil
- }
- } else {
- if x.InReplyToUserID == nil {
- x.InReplyToUserID = new(string)
- }
- yym66 := z.DecBinary()
- _ = yym66
- if false {
- } else {
- *((*string)(x.InReplyToUserID)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.InReplyToUserIDStr != nil {
- x.InReplyToUserIDStr = nil
- }
- } else {
- if x.InReplyToUserIDStr == nil {
- x.InReplyToUserIDStr = new(string)
- }
- yym68 := z.DecBinary()
- _ = yym68
- if false {
- } else {
- *((*string)(x.InReplyToUserIDStr)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Metadata = StatusMetadata{}
- } else {
- yyv69 := &x.Metadata
- yyv69.CodecDecodeSelf(d)
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- if x.Place != nil {
- x.Place = nil
- }
- } else {
- if x.Place == nil {
- x.Place = new(string)
- }
- yym71 := z.DecBinary()
- _ = yym71
- if false {
- } else {
- *((*string)(x.Place)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.RetweetCount = 0
- } else {
- yyv72 := &x.RetweetCount
- yym73 := z.DecBinary()
- _ = yym73
- if false {
- } else {
- *((*int)(yyv72)) = int(r.DecodeInt(codecSelferBitsize9225))
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Retweeted = false
- } else {
- yyv74 := &x.Retweeted
- yym75 := z.DecBinary()
- _ = yym75
- if false {
- } else {
- *((*bool)(yyv74)) = r.DecodeBool()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Source = ""
- } else {
- yyv76 := &x.Source
- yym77 := z.DecBinary()
- _ = yym77
- if false {
- } else {
- *((*string)(yyv76)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Text = ""
- } else {
- yyv78 := &x.Text
- yym79 := z.DecBinary()
- _ = yym79
- if false {
- } else {
- *((*string)(yyv78)) = r.DecodeString()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Truncated = false
- } else {
- yyv80 := &x.Truncated
- yym81 := z.DecBinary()
- _ = yym81
- if false {
- } else {
- *((*bool)(yyv80)) = r.DecodeBool()
- }
- }
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.User = User{}
- } else {
- yyv82 := &x.User
- yyv82.CodecDecodeSelf(d)
- }
- for {
- yyj43++
- if yyhl43 {
- yyb43 = yyj43 > l
- } else {
- yyb43 = r.CheckBreak()
- }
- if yyb43 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj43-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *LargeStruct) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [2]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(2)
- } else {
- yynn2 = 2
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy4 := &x.SearchMetadata
- yy4.CodecEncodeSelf(e)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("search_metadata"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- yy6 := &x.SearchMetadata
- yy6.CodecEncodeSelf(e)
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Statuses == nil {
- r.EncodeNil()
- } else {
- yym9 := z.EncBinary()
- _ = yym9
- if false {
- } else {
- h.encSliceStatus(([]Status)(x.Statuses), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("statuses"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Statuses == nil {
- r.EncodeNil()
- } else {
- yym10 := z.EncBinary()
- _ = yym10
- if false {
- } else {
- h.encSliceStatus(([]Status)(x.Statuses), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *LargeStruct) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *LargeStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "search_metadata":
- if r.TryDecodeAsNil() {
- x.SearchMetadata = SearchMetadata{}
- } else {
- yyv4 := &x.SearchMetadata
- yyv4.CodecDecodeSelf(d)
- }
- case "statuses":
- if r.TryDecodeAsNil() {
- x.Statuses = nil
- } else {
- yyv5 := &x.Statuses
- yym6 := z.DecBinary()
- _ = yym6
- if false {
- } else {
- h.decSliceStatus((*[]Status)(yyv5), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *LargeStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj7 int
- var yyb7 bool
- var yyhl7 bool = l >= 0
- yyj7++
- if yyhl7 {
- yyb7 = yyj7 > l
- } else {
- yyb7 = r.CheckBreak()
- }
- if yyb7 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.SearchMetadata = SearchMetadata{}
- } else {
- yyv8 := &x.SearchMetadata
- yyv8.CodecDecodeSelf(d)
- }
- yyj7++
- if yyhl7 {
- yyb7 = yyj7 > l
- } else {
- yyb7 = r.CheckBreak()
- }
- if yyb7 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Statuses = nil
- } else {
- yyv9 := &x.Statuses
- yym10 := z.DecBinary()
- _ = yym10
- if false {
- } else {
- h.decSliceStatus((*[]Status)(yyv9), d)
- }
- }
- for {
- yyj7++
- if yyhl7 {
- yyb7 = yyj7 > l
- } else {
- yyb7 = r.CheckBreak()
- }
- if yyb7 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj7-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x *XLStruct) CodecEncodeSelf(e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- if x == nil {
- r.EncodeNil()
- } else {
- yym1 := z.EncBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.EncExt(x) {
- } else {
- yysep2 := !z.EncBinary()
- yy2arr2 := z.EncBasicHandle().StructToArray
- var yyq2 [1]bool
- _, _, _ = yysep2, yyq2, yy2arr2
- const yyr2 bool = false
- var yynn2 int
- if yyr2 || yy2arr2 {
- r.EncodeArrayStart(1)
- } else {
- yynn2 = 1
- for _, b := range yyq2 {
- if b {
- yynn2++
- }
- }
- r.EncodeMapStart(yynn2)
- yynn2 = 0
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if x.Data == nil {
- r.EncodeNil()
- } else {
- yym4 := z.EncBinary()
- _ = yym4
- if false {
- } else {
- h.encSliceLargeStruct(([]LargeStruct)(x.Data), e)
- }
- }
- } else {
- z.EncSendContainerState(codecSelfer_containerMapKey9225)
- r.EncodeString(codecSelferC_UTF89225, string("Data"))
- z.EncSendContainerState(codecSelfer_containerMapValue9225)
- if x.Data == nil {
- r.EncodeNil()
- } else {
- yym5 := z.EncBinary()
- _ = yym5
- if false {
- } else {
- h.encSliceLargeStruct(([]LargeStruct)(x.Data), e)
- }
- }
- }
- if yyr2 || yy2arr2 {
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- z.EncSendContainerState(codecSelfer_containerMapEnd9225)
- }
- }
- }
-}
-
-func (x *XLStruct) CodecDecodeSelf(d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- yym1 := z.DecBinary()
- _ = yym1
- if false {
- } else if z.HasExtensions() && z.DecExt(x) {
- } else {
- yyct2 := r.ContainerType()
- if yyct2 == codecSelferValueTypeMap9225 {
- yyl2 := r.ReadMapStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
- } else {
- x.codecDecodeSelfFromMap(yyl2, d)
- }
- } else if yyct2 == codecSelferValueTypeArray9225 {
- yyl2 := r.ReadArrayStart()
- if yyl2 == 0 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- } else {
- x.codecDecodeSelfFromArray(yyl2, d)
- }
- } else {
- panic(codecSelferOnlyMapOrArrayEncodeToStructErr9225)
- }
- }
-}
-
-func (x *XLStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yys3Slc = z.DecScratchBuffer() // default slice to decode into
- _ = yys3Slc
- var yyhl3 bool = l >= 0
- for yyj3 := 0; ; yyj3++ {
- if yyhl3 {
- if yyj3 >= l {
- break
- }
- } else {
- if r.CheckBreak() {
- break
- }
- }
- z.DecSendContainerState(codecSelfer_containerMapKey9225)
- yys3Slc = r.DecodeBytes(yys3Slc, true, true)
- yys3SlcHdr := codecSelferUnsafeString9225{uintptr(unsafe.Pointer(&yys3Slc[0])), len(yys3Slc)}
- yys3 := *(*string)(unsafe.Pointer(&yys3SlcHdr))
- z.DecSendContainerState(codecSelfer_containerMapValue9225)
- switch yys3 {
- case "Data":
- if r.TryDecodeAsNil() {
- x.Data = nil
- } else {
- yyv4 := &x.Data
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- h.decSliceLargeStruct((*[]LargeStruct)(yyv4), d)
- }
- }
- default:
- z.DecStructFieldNotFound(-1, yys3)
- } // end switch yys3
- } // end for yyj3
- z.DecSendContainerState(codecSelfer_containerMapEnd9225)
-}
-
-func (x *XLStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
- var yyj6 int
- var yyb6 bool
- var yyhl6 bool = l >= 0
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
- return
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- if r.TryDecodeAsNil() {
- x.Data = nil
- } else {
- yyv7 := &x.Data
- yym8 := z.DecBinary()
- _ = yym8
- if false {
- } else {
- h.decSliceLargeStruct((*[]LargeStruct)(yyv7), d)
- }
- }
- for {
- yyj6++
- if yyhl6 {
- yyb6 = yyj6 > l
- } else {
- yyb6 = r.CheckBreak()
- }
- if yyb6 {
- break
- }
- z.DecSendContainerState(codecSelfer_containerArrayElem9225)
- z.DecStructFieldNotFound(yyj6-1, "")
- }
- z.DecSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x codecSelfer9225) encSliceHashtag(v []Hashtag, e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x codecSelfer9225) decSliceHashtag(v *[]Hashtag, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []Hashtag{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 40)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]Hashtag, yyrl1)
- }
- } else {
- yyv1 = make([]Hashtag, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Hashtag{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, Hashtag{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Hashtag{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, Hashtag{}) // var yyz1 Hashtag
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Hashtag{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []Hashtag{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer9225) encSlicePtrtostring(v []*string, e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- if yyv1 == nil {
- r.EncodeNil()
- } else {
- yy2 := *yyv1
- yym3 := z.EncBinary()
- _ = yym3
- if false {
- } else {
- r.EncodeString(codecSelferC_UTF89225, string(yy2))
- }
- }
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x codecSelfer9225) decSlicePtrtostring(v *[]*string, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []*string{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]*string, yyrl1)
- }
- } else {
- yyv1 = make([]*string, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- if yyv1[yyj1] != nil {
- *yyv1[yyj1] = ""
- }
- } else {
- if yyv1[yyj1] == nil {
- yyv1[yyj1] = new(string)
- }
- yyw2 := yyv1[yyj1]
- yym3 := z.DecBinary()
- _ = yym3
- if false {
- } else {
- *((*string)(yyw2)) = r.DecodeString()
- }
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, nil)
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- if yyv1[yyj1] != nil {
- *yyv1[yyj1] = ""
- }
- } else {
- if yyv1[yyj1] == nil {
- yyv1[yyj1] = new(string)
- }
- yyw4 := yyv1[yyj1]
- yym5 := z.DecBinary()
- _ = yym5
- if false {
- } else {
- *((*string)(yyw4)) = r.DecodeString()
- }
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, nil) // var yyz1 *string
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- if yyv1[yyj1] != nil {
- *yyv1[yyj1] = ""
- }
- } else {
- if yyv1[yyj1] == nil {
- yyv1[yyj1] = new(string)
- }
- yyw6 := yyv1[yyj1]
- yym7 := z.DecBinary()
- _ = yym7
- if false {
- } else {
- *((*string)(yyw6)) = r.DecodeString()
- }
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []*string{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer9225) encSliceURL(v []URL, e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x codecSelfer9225) decSliceURL(v *[]URL, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []URL{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 48)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]URL, yyrl1)
- }
- } else {
- yyv1 = make([]URL, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = URL{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, URL{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = URL{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, URL{}) // var yyz1 URL
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = URL{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []URL{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer9225) encSliceStatus(v []Status, e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x codecSelfer9225) decSliceStatus(v *[]Status, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []Status{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 752)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]Status, yyrl1)
- }
- } else {
- yyv1 = make([]Status, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Status{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, Status{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Status{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, Status{}) // var yyz1 Status
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = Status{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []Status{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
-
-func (x codecSelfer9225) encSliceLargeStruct(v []LargeStruct, e *codec1978.Encoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperEncoder(e)
- _, _, _ = h, z, r
- r.EncodeArrayStart(len(v))
- for _, yyv1 := range v {
- z.EncSendContainerState(codecSelfer_containerArrayElem9225)
- yy2 := &yyv1
- yy2.CodecEncodeSelf(e)
- }
- z.EncSendContainerState(codecSelfer_containerArrayEnd9225)
-}
-
-func (x codecSelfer9225) decSliceLargeStruct(v *[]LargeStruct, d *codec1978.Decoder) {
- var h codecSelfer9225
- z, r := codec1978.GenHelperDecoder(d)
- _, _, _ = h, z, r
-
- yyv1 := *v
- yyh1, yyl1 := z.DecSliceHelperStart()
- var yyc1 bool
- _ = yyc1
- if yyl1 == 0 {
- if yyv1 == nil {
- yyv1 = []LargeStruct{}
- yyc1 = true
- } else if len(yyv1) != 0 {
- yyv1 = yyv1[:0]
- yyc1 = true
- }
- } else if yyl1 > 0 {
- var yyrr1, yyrl1 int
- var yyrt1 bool
- _, _ = yyrl1, yyrt1
- yyrr1 = yyl1 // len(yyv1)
- if yyl1 > cap(yyv1) {
-
- yyrg1 := len(yyv1) > 0
- yyv21 := yyv1
- yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 136)
- if yyrt1 {
- if yyrl1 <= cap(yyv1) {
- yyv1 = yyv1[:yyrl1]
- } else {
- yyv1 = make([]LargeStruct, yyrl1)
- }
- } else {
- yyv1 = make([]LargeStruct, yyrl1)
- }
- yyc1 = true
- yyrr1 = len(yyv1)
- if yyrg1 {
- copy(yyv1, yyv21)
- }
- } else if yyl1 != len(yyv1) {
- yyv1 = yyv1[:yyl1]
- yyc1 = true
- }
- yyj1 := 0
- for ; yyj1 < yyrr1; yyj1++ {
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = LargeStruct{}
- } else {
- yyv2 := &yyv1[yyj1]
- yyv2.CodecDecodeSelf(d)
- }
-
- }
- if yyrt1 {
- for ; yyj1 < yyl1; yyj1++ {
- yyv1 = append(yyv1, LargeStruct{})
- yyh1.ElemContainerState(yyj1)
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = LargeStruct{}
- } else {
- yyv3 := &yyv1[yyj1]
- yyv3.CodecDecodeSelf(d)
- }
-
- }
- }
-
- } else {
- yyj1 := 0
- for ; !r.CheckBreak(); yyj1++ {
-
- if yyj1 >= len(yyv1) {
- yyv1 = append(yyv1, LargeStruct{}) // var yyz1 LargeStruct
- yyc1 = true
- }
- yyh1.ElemContainerState(yyj1)
- if yyj1 < len(yyv1) {
- if r.TryDecodeAsNil() {
- yyv1[yyj1] = LargeStruct{}
- } else {
- yyv4 := &yyv1[yyj1]
- yyv4.CodecDecodeSelf(d)
- }
-
- } else {
- z.DecSwallow()
- }
-
- }
- if yyj1 < len(yyv1) {
- yyv1 = yyv1[:yyj1]
- yyc1 = true
- } else if yyj1 == 0 && yyv1 == nil {
- yyv1 = []LargeStruct{}
- yyc1 = true
- }
- }
- yyh1.End()
- if yyc1 {
- *v = yyv1
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/data_ffjson.go b/vendor/github.com/mailru/easyjson/benchmark/data_ffjson.go
deleted file mode 100644
index 9f000d3ad..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/data_ffjson.go
+++ /dev/null
@@ -1,6723 +0,0 @@
-// +build use_ffjson
-
-// DO NOT EDIT!
-// Code generated by ffjson <https://github.com/pquerna/ffjson>
-// source: .root/src/github.com/mailru/easyjson/benchmark/data.go
-// DO NOT EDIT!
-
-package benchmark
-
-import (
- "bytes"
- "errors"
- "fmt"
- fflib "github.com/pquerna/ffjson/fflib/v1"
-)
-
-func (mj *Entities) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *Entities) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"hashtags":`)
- if mj.Hashtags != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Hashtags {
- if i != 0 {
- buf.WriteString(`,`)
- }
-
- {
-
- err = v.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteString(`,"urls":`)
- if mj.Urls != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Urls {
- if i != 0 {
- buf.WriteString(`,`)
- }
- if v != nil {
- fflib.WriteJsonString(buf, string(*v))
- } else {
- buf.WriteString(`null`)
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteString(`,"user_mentions":`)
- if mj.UserMentions != nil {
- buf.WriteString(`[`)
- for i, v := range mj.UserMentions {
- if i != 0 {
- buf.WriteString(`,`)
- }
- if v != nil {
- fflib.WriteJsonString(buf, string(*v))
- } else {
- buf.WriteString(`null`)
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_Entitiesbase = iota
- ffj_t_Entitiesno_such_key
-
- ffj_t_Entities_Hashtags
-
- ffj_t_Entities_Urls
-
- ffj_t_Entities_UserMentions
-)
-
-var ffj_key_Entities_Hashtags = []byte("hashtags")
-
-var ffj_key_Entities_Urls = []byte("urls")
-
-var ffj_key_Entities_UserMentions = []byte("user_mentions")
-
-func (uj *Entities) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *Entities) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_Entitiesbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_Entitiesno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'h':
-
- if bytes.Equal(ffj_key_Entities_Hashtags, kn) {
- currentKey = ffj_t_Entities_Hashtags
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'u':
-
- if bytes.Equal(ffj_key_Entities_Urls, kn) {
- currentKey = ffj_t_Entities_Urls
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Entities_UserMentions, kn) {
- currentKey = ffj_t_Entities_UserMentions
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_Entities_UserMentions, kn) {
- currentKey = ffj_t_Entities_UserMentions
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Entities_Urls, kn) {
- currentKey = ffj_t_Entities_Urls
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Entities_Hashtags, kn) {
- currentKey = ffj_t_Entities_Hashtags
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_Entitiesno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_Entities_Hashtags:
- goto handle_Hashtags
-
- case ffj_t_Entities_Urls:
- goto handle_Urls
-
- case ffj_t_Entities_UserMentions:
- goto handle_UserMentions
-
- case ffj_t_Entitiesno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Hashtags:
-
- /* handler: uj.Hashtags type=[]benchmark.Hashtag kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Hashtags = nil
- } else {
-
- uj.Hashtags = make([]Hashtag, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Hashtags Hashtag
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Hashtags type=benchmark.Hashtag kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = tmp_uj__Hashtags.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- uj.Hashtags = append(uj.Hashtags, tmp_uj__Hashtags)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Urls:
-
- /* handler: uj.Urls type=[]*string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Urls = nil
- } else {
-
- uj.Urls = make([]*string, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Urls *string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Urls type=*string kind=ptr quoted=false*/
-
- {
-
- if tok == fflib.FFTok_null {
- tmp_uj__Urls = nil
- } else {
- if tmp_uj__Urls == nil {
- tmp_uj__Urls = new(string)
- }
-
- /* handler: tmp_uj__Urls type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- tmp_uj__Urls = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- tmp_uj__Urls = &tval
-
- }
- }
-
- }
- }
-
- uj.Urls = append(uj.Urls, tmp_uj__Urls)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UserMentions:
-
- /* handler: uj.UserMentions type=[]*string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.UserMentions = nil
- } else {
-
- uj.UserMentions = make([]*string, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__UserMentions *string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__UserMentions type=*string kind=ptr quoted=false*/
-
- {
-
- if tok == fflib.FFTok_null {
- tmp_uj__UserMentions = nil
- } else {
- if tmp_uj__UserMentions == nil {
- tmp_uj__UserMentions = new(string)
- }
-
- /* handler: tmp_uj__UserMentions type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- tmp_uj__UserMentions = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- tmp_uj__UserMentions = &tval
-
- }
- }
-
- }
- }
-
- uj.UserMentions = append(uj.UserMentions, tmp_uj__UserMentions)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *Hashtag) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *Hashtag) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"indices":`)
- if mj.Indices != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Indices {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.FormatBits2(buf, uint64(v), 10, v < 0)
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteString(`,"text":`)
- fflib.WriteJsonString(buf, string(mj.Text))
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_Hashtagbase = iota
- ffj_t_Hashtagno_such_key
-
- ffj_t_Hashtag_Indices
-
- ffj_t_Hashtag_Text
-)
-
-var ffj_key_Hashtag_Indices = []byte("indices")
-
-var ffj_key_Hashtag_Text = []byte("text")
-
-func (uj *Hashtag) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *Hashtag) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_Hashtagbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_Hashtagno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'i':
-
- if bytes.Equal(ffj_key_Hashtag_Indices, kn) {
- currentKey = ffj_t_Hashtag_Indices
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 't':
-
- if bytes.Equal(ffj_key_Hashtag_Text, kn) {
- currentKey = ffj_t_Hashtag_Text
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Hashtag_Text, kn) {
- currentKey = ffj_t_Hashtag_Text
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Hashtag_Indices, kn) {
- currentKey = ffj_t_Hashtag_Indices
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_Hashtagno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_Hashtag_Indices:
- goto handle_Indices
-
- case ffj_t_Hashtag_Text:
- goto handle_Text
-
- case ffj_t_Hashtagno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Indices:
-
- /* handler: uj.Indices type=[]int kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Indices = nil
- } else {
-
- uj.Indices = make([]int, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Indices int
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Indices type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- tmp_uj__Indices = int(tval)
-
- }
- }
-
- uj.Indices = append(uj.Indices, tmp_uj__Indices)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Text:
-
- /* handler: uj.Text type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Text = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *LargeStruct) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *LargeStruct) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"search_metadata":`)
-
- {
-
- err = mj.SearchMetadata.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- buf.WriteString(`,"statuses":`)
- if mj.Statuses != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Statuses {
- if i != 0 {
- buf.WriteString(`,`)
- }
-
- {
-
- err = v.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_LargeStructbase = iota
- ffj_t_LargeStructno_such_key
-
- ffj_t_LargeStruct_SearchMetadata
-
- ffj_t_LargeStruct_Statuses
-)
-
-var ffj_key_LargeStruct_SearchMetadata = []byte("search_metadata")
-
-var ffj_key_LargeStruct_Statuses = []byte("statuses")
-
-func (uj *LargeStruct) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *LargeStruct) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_LargeStructbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_LargeStructno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 's':
-
- if bytes.Equal(ffj_key_LargeStruct_SearchMetadata, kn) {
- currentKey = ffj_t_LargeStruct_SearchMetadata
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_LargeStruct_Statuses, kn) {
- currentKey = ffj_t_LargeStruct_Statuses
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_LargeStruct_Statuses, kn) {
- currentKey = ffj_t_LargeStruct_Statuses
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_LargeStruct_SearchMetadata, kn) {
- currentKey = ffj_t_LargeStruct_SearchMetadata
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_LargeStructno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_LargeStruct_SearchMetadata:
- goto handle_SearchMetadata
-
- case ffj_t_LargeStruct_Statuses:
- goto handle_Statuses
-
- case ffj_t_LargeStructno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_SearchMetadata:
-
- /* handler: uj.SearchMetadata type=benchmark.SearchMetadata kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.SearchMetadata.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Statuses:
-
- /* handler: uj.Statuses type=[]benchmark.Status kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Statuses = nil
- } else {
-
- uj.Statuses = make([]Status, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Statuses Status
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Statuses type=benchmark.Status kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = tmp_uj__Statuses.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- uj.Statuses = append(uj.Statuses, tmp_uj__Statuses)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *SearchMetadata) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *SearchMetadata) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"completed_in":`)
- fflib.AppendFloat(buf, float64(mj.CompletedIn), 'g', -1, 64)
- buf.WriteString(`,"count":`)
- fflib.FormatBits2(buf, uint64(mj.Count), 10, mj.Count < 0)
- buf.WriteString(`,"max_id":`)
- fflib.FormatBits2(buf, uint64(mj.MaxID), 10, mj.MaxID < 0)
- buf.WriteString(`,"max_id_str":`)
- fflib.WriteJsonString(buf, string(mj.MaxIDStr))
- buf.WriteString(`,"next_results":`)
- fflib.WriteJsonString(buf, string(mj.NextResults))
- buf.WriteString(`,"query":`)
- fflib.WriteJsonString(buf, string(mj.Query))
- buf.WriteString(`,"refresh_url":`)
- fflib.WriteJsonString(buf, string(mj.RefreshURL))
- buf.WriteString(`,"since_id":`)
- fflib.FormatBits2(buf, uint64(mj.SinceID), 10, mj.SinceID < 0)
- buf.WriteString(`,"since_id_str":`)
- fflib.WriteJsonString(buf, string(mj.SinceIDStr))
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_SearchMetadatabase = iota
- ffj_t_SearchMetadatano_such_key
-
- ffj_t_SearchMetadata_CompletedIn
-
- ffj_t_SearchMetadata_Count
-
- ffj_t_SearchMetadata_MaxID
-
- ffj_t_SearchMetadata_MaxIDStr
-
- ffj_t_SearchMetadata_NextResults
-
- ffj_t_SearchMetadata_Query
-
- ffj_t_SearchMetadata_RefreshURL
-
- ffj_t_SearchMetadata_SinceID
-
- ffj_t_SearchMetadata_SinceIDStr
-)
-
-var ffj_key_SearchMetadata_CompletedIn = []byte("completed_in")
-
-var ffj_key_SearchMetadata_Count = []byte("count")
-
-var ffj_key_SearchMetadata_MaxID = []byte("max_id")
-
-var ffj_key_SearchMetadata_MaxIDStr = []byte("max_id_str")
-
-var ffj_key_SearchMetadata_NextResults = []byte("next_results")
-
-var ffj_key_SearchMetadata_Query = []byte("query")
-
-var ffj_key_SearchMetadata_RefreshURL = []byte("refresh_url")
-
-var ffj_key_SearchMetadata_SinceID = []byte("since_id")
-
-var ffj_key_SearchMetadata_SinceIDStr = []byte("since_id_str")
-
-func (uj *SearchMetadata) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *SearchMetadata) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_SearchMetadatabase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_SearchMetadatano_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'c':
-
- if bytes.Equal(ffj_key_SearchMetadata_CompletedIn, kn) {
- currentKey = ffj_t_SearchMetadata_CompletedIn
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_SearchMetadata_Count, kn) {
- currentKey = ffj_t_SearchMetadata_Count
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'm':
-
- if bytes.Equal(ffj_key_SearchMetadata_MaxID, kn) {
- currentKey = ffj_t_SearchMetadata_MaxID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_SearchMetadata_MaxIDStr, kn) {
- currentKey = ffj_t_SearchMetadata_MaxIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'n':
-
- if bytes.Equal(ffj_key_SearchMetadata_NextResults, kn) {
- currentKey = ffj_t_SearchMetadata_NextResults
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'q':
-
- if bytes.Equal(ffj_key_SearchMetadata_Query, kn) {
- currentKey = ffj_t_SearchMetadata_Query
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'r':
-
- if bytes.Equal(ffj_key_SearchMetadata_RefreshURL, kn) {
- currentKey = ffj_t_SearchMetadata_RefreshURL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 's':
-
- if bytes.Equal(ffj_key_SearchMetadata_SinceID, kn) {
- currentKey = ffj_t_SearchMetadata_SinceID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_SearchMetadata_SinceIDStr, kn) {
- currentKey = ffj_t_SearchMetadata_SinceIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_SearchMetadata_SinceIDStr, kn) {
- currentKey = ffj_t_SearchMetadata_SinceIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_SearchMetadata_SinceID, kn) {
- currentKey = ffj_t_SearchMetadata_SinceID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_SearchMetadata_RefreshURL, kn) {
- currentKey = ffj_t_SearchMetadata_RefreshURL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_SearchMetadata_Query, kn) {
- currentKey = ffj_t_SearchMetadata_Query
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_SearchMetadata_NextResults, kn) {
- currentKey = ffj_t_SearchMetadata_NextResults
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_SearchMetadata_MaxIDStr, kn) {
- currentKey = ffj_t_SearchMetadata_MaxIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_SearchMetadata_MaxID, kn) {
- currentKey = ffj_t_SearchMetadata_MaxID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_SearchMetadata_Count, kn) {
- currentKey = ffj_t_SearchMetadata_Count
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_SearchMetadata_CompletedIn, kn) {
- currentKey = ffj_t_SearchMetadata_CompletedIn
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_SearchMetadatano_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_SearchMetadata_CompletedIn:
- goto handle_CompletedIn
-
- case ffj_t_SearchMetadata_Count:
- goto handle_Count
-
- case ffj_t_SearchMetadata_MaxID:
- goto handle_MaxID
-
- case ffj_t_SearchMetadata_MaxIDStr:
- goto handle_MaxIDStr
-
- case ffj_t_SearchMetadata_NextResults:
- goto handle_NextResults
-
- case ffj_t_SearchMetadata_Query:
- goto handle_Query
-
- case ffj_t_SearchMetadata_RefreshURL:
- goto handle_RefreshURL
-
- case ffj_t_SearchMetadata_SinceID:
- goto handle_SinceID
-
- case ffj_t_SearchMetadata_SinceIDStr:
- goto handle_SinceIDStr
-
- case ffj_t_SearchMetadatano_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_CompletedIn:
-
- /* handler: uj.CompletedIn type=float64 kind=float64 quoted=false*/
-
- {
- if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.CompletedIn = float64(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Count:
-
- /* handler: uj.Count type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.Count = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_MaxID:
-
- /* handler: uj.MaxID type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.MaxID = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_MaxIDStr:
-
- /* handler: uj.MaxIDStr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.MaxIDStr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_NextResults:
-
- /* handler: uj.NextResults type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.NextResults = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Query:
-
- /* handler: uj.Query type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Query = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_RefreshURL:
-
- /* handler: uj.RefreshURL type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.RefreshURL = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_SinceID:
-
- /* handler: uj.SinceID type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.SinceID = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_SinceIDStr:
-
- /* handler: uj.SinceIDStr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.SinceIDStr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *Status) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *Status) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- if mj.Contributors != nil {
- buf.WriteString(`{"contributors":`)
- fflib.WriteJsonString(buf, string(*mj.Contributors))
- } else {
- buf.WriteString(`{"contributors":null`)
- }
- if mj.Coordinates != nil {
- buf.WriteString(`,"coordinates":`)
- fflib.WriteJsonString(buf, string(*mj.Coordinates))
- } else {
- buf.WriteString(`,"coordinates":null`)
- }
- buf.WriteString(`,"created_at":`)
- fflib.WriteJsonString(buf, string(mj.CreatedAt))
- buf.WriteString(`,"entities":`)
-
- {
-
- err = mj.Entities.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- if mj.Favorited {
- buf.WriteString(`,"favorited":true`)
- } else {
- buf.WriteString(`,"favorited":false`)
- }
- if mj.Geo != nil {
- buf.WriteString(`,"geo":`)
- fflib.WriteJsonString(buf, string(*mj.Geo))
- } else {
- buf.WriteString(`,"geo":null`)
- }
- buf.WriteString(`,"id":`)
- fflib.FormatBits2(buf, uint64(mj.ID), 10, mj.ID < 0)
- buf.WriteString(`,"id_str":`)
- fflib.WriteJsonString(buf, string(mj.IDStr))
- if mj.InReplyToScreenName != nil {
- buf.WriteString(`,"in_reply_to_screen_name":`)
- fflib.WriteJsonString(buf, string(*mj.InReplyToScreenName))
- } else {
- buf.WriteString(`,"in_reply_to_screen_name":null`)
- }
- if mj.InReplyToStatusID != nil {
- buf.WriteString(`,"in_reply_to_status_id":`)
- fflib.WriteJsonString(buf, string(*mj.InReplyToStatusID))
- } else {
- buf.WriteString(`,"in_reply_to_status_id":null`)
- }
- if mj.InReplyToStatusIDStr != nil {
- buf.WriteString(`,"in_reply_to_status_id_str":`)
- fflib.WriteJsonString(buf, string(*mj.InReplyToStatusIDStr))
- } else {
- buf.WriteString(`,"in_reply_to_status_id_str":null`)
- }
- if mj.InReplyToUserID != nil {
- buf.WriteString(`,"in_reply_to_user_id":`)
- fflib.WriteJsonString(buf, string(*mj.InReplyToUserID))
- } else {
- buf.WriteString(`,"in_reply_to_user_id":null`)
- }
- if mj.InReplyToUserIDStr != nil {
- buf.WriteString(`,"in_reply_to_user_id_str":`)
- fflib.WriteJsonString(buf, string(*mj.InReplyToUserIDStr))
- } else {
- buf.WriteString(`,"in_reply_to_user_id_str":null`)
- }
- buf.WriteString(`,"metadata":`)
-
- {
-
- err = mj.Metadata.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- if mj.Place != nil {
- buf.WriteString(`,"place":`)
- fflib.WriteJsonString(buf, string(*mj.Place))
- } else {
- buf.WriteString(`,"place":null`)
- }
- buf.WriteString(`,"retweet_count":`)
- fflib.FormatBits2(buf, uint64(mj.RetweetCount), 10, mj.RetweetCount < 0)
- if mj.Retweeted {
- buf.WriteString(`,"retweeted":true`)
- } else {
- buf.WriteString(`,"retweeted":false`)
- }
- buf.WriteString(`,"source":`)
- fflib.WriteJsonString(buf, string(mj.Source))
- buf.WriteString(`,"text":`)
- fflib.WriteJsonString(buf, string(mj.Text))
- if mj.Truncated {
- buf.WriteString(`,"truncated":true`)
- } else {
- buf.WriteString(`,"truncated":false`)
- }
- buf.WriteString(`,"user":`)
-
- {
-
- err = mj.User.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_Statusbase = iota
- ffj_t_Statusno_such_key
-
- ffj_t_Status_Contributors
-
- ffj_t_Status_Coordinates
-
- ffj_t_Status_CreatedAt
-
- ffj_t_Status_Entities
-
- ffj_t_Status_Favorited
-
- ffj_t_Status_Geo
-
- ffj_t_Status_ID
-
- ffj_t_Status_IDStr
-
- ffj_t_Status_InReplyToScreenName
-
- ffj_t_Status_InReplyToStatusID
-
- ffj_t_Status_InReplyToStatusIDStr
-
- ffj_t_Status_InReplyToUserID
-
- ffj_t_Status_InReplyToUserIDStr
-
- ffj_t_Status_Metadata
-
- ffj_t_Status_Place
-
- ffj_t_Status_RetweetCount
-
- ffj_t_Status_Retweeted
-
- ffj_t_Status_Source
-
- ffj_t_Status_Text
-
- ffj_t_Status_Truncated
-
- ffj_t_Status_User
-)
-
-var ffj_key_Status_Contributors = []byte("contributors")
-
-var ffj_key_Status_Coordinates = []byte("coordinates")
-
-var ffj_key_Status_CreatedAt = []byte("created_at")
-
-var ffj_key_Status_Entities = []byte("entities")
-
-var ffj_key_Status_Favorited = []byte("favorited")
-
-var ffj_key_Status_Geo = []byte("geo")
-
-var ffj_key_Status_ID = []byte("id")
-
-var ffj_key_Status_IDStr = []byte("id_str")
-
-var ffj_key_Status_InReplyToScreenName = []byte("in_reply_to_screen_name")
-
-var ffj_key_Status_InReplyToStatusID = []byte("in_reply_to_status_id")
-
-var ffj_key_Status_InReplyToStatusIDStr = []byte("in_reply_to_status_id_str")
-
-var ffj_key_Status_InReplyToUserID = []byte("in_reply_to_user_id")
-
-var ffj_key_Status_InReplyToUserIDStr = []byte("in_reply_to_user_id_str")
-
-var ffj_key_Status_Metadata = []byte("metadata")
-
-var ffj_key_Status_Place = []byte("place")
-
-var ffj_key_Status_RetweetCount = []byte("retweet_count")
-
-var ffj_key_Status_Retweeted = []byte("retweeted")
-
-var ffj_key_Status_Source = []byte("source")
-
-var ffj_key_Status_Text = []byte("text")
-
-var ffj_key_Status_Truncated = []byte("truncated")
-
-var ffj_key_Status_User = []byte("user")
-
-func (uj *Status) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *Status) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_Statusbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_Statusno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'c':
-
- if bytes.Equal(ffj_key_Status_Contributors, kn) {
- currentKey = ffj_t_Status_Contributors
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_Coordinates, kn) {
- currentKey = ffj_t_Status_Coordinates
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_CreatedAt, kn) {
- currentKey = ffj_t_Status_CreatedAt
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'e':
-
- if bytes.Equal(ffj_key_Status_Entities, kn) {
- currentKey = ffj_t_Status_Entities
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'f':
-
- if bytes.Equal(ffj_key_Status_Favorited, kn) {
- currentKey = ffj_t_Status_Favorited
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'g':
-
- if bytes.Equal(ffj_key_Status_Geo, kn) {
- currentKey = ffj_t_Status_Geo
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'i':
-
- if bytes.Equal(ffj_key_Status_ID, kn) {
- currentKey = ffj_t_Status_ID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_IDStr, kn) {
- currentKey = ffj_t_Status_IDStr
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_InReplyToScreenName, kn) {
- currentKey = ffj_t_Status_InReplyToScreenName
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_InReplyToStatusID, kn) {
- currentKey = ffj_t_Status_InReplyToStatusID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_InReplyToStatusIDStr, kn) {
- currentKey = ffj_t_Status_InReplyToStatusIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_InReplyToUserID, kn) {
- currentKey = ffj_t_Status_InReplyToUserID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_InReplyToUserIDStr, kn) {
- currentKey = ffj_t_Status_InReplyToUserIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'm':
-
- if bytes.Equal(ffj_key_Status_Metadata, kn) {
- currentKey = ffj_t_Status_Metadata
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'p':
-
- if bytes.Equal(ffj_key_Status_Place, kn) {
- currentKey = ffj_t_Status_Place
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'r':
-
- if bytes.Equal(ffj_key_Status_RetweetCount, kn) {
- currentKey = ffj_t_Status_RetweetCount
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_Retweeted, kn) {
- currentKey = ffj_t_Status_Retweeted
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 's':
-
- if bytes.Equal(ffj_key_Status_Source, kn) {
- currentKey = ffj_t_Status_Source
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 't':
-
- if bytes.Equal(ffj_key_Status_Text, kn) {
- currentKey = ffj_t_Status_Text
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_Status_Truncated, kn) {
- currentKey = ffj_t_Status_Truncated
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'u':
-
- if bytes.Equal(ffj_key_Status_User, kn) {
- currentKey = ffj_t_Status_User
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_User, kn) {
- currentKey = ffj_t_Status_User
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Truncated, kn) {
- currentKey = ffj_t_Status_Truncated
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Text, kn) {
- currentKey = ffj_t_Status_Text
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_Source, kn) {
- currentKey = ffj_t_Status_Source
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Retweeted, kn) {
- currentKey = ffj_t_Status_Retweeted
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_Status_RetweetCount, kn) {
- currentKey = ffj_t_Status_RetweetCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Place, kn) {
- currentKey = ffj_t_Status_Place
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Metadata, kn) {
- currentKey = ffj_t_Status_Metadata
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_InReplyToUserIDStr, kn) {
- currentKey = ffj_t_Status_InReplyToUserIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_InReplyToUserID, kn) {
- currentKey = ffj_t_Status_InReplyToUserID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_InReplyToStatusIDStr, kn) {
- currentKey = ffj_t_Status_InReplyToStatusIDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_InReplyToStatusID, kn) {
- currentKey = ffj_t_Status_InReplyToStatusID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_InReplyToScreenName, kn) {
- currentKey = ffj_t_Status_InReplyToScreenName
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_IDStr, kn) {
- currentKey = ffj_t_Status_IDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_ID, kn) {
- currentKey = ffj_t_Status_ID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Geo, kn) {
- currentKey = ffj_t_Status_Geo
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_Status_Favorited, kn) {
- currentKey = ffj_t_Status_Favorited
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_Entities, kn) {
- currentKey = ffj_t_Status_Entities
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_Status_CreatedAt, kn) {
- currentKey = ffj_t_Status_CreatedAt
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_Coordinates, kn) {
- currentKey = ffj_t_Status_Coordinates
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_Status_Contributors, kn) {
- currentKey = ffj_t_Status_Contributors
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_Statusno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_Status_Contributors:
- goto handle_Contributors
-
- case ffj_t_Status_Coordinates:
- goto handle_Coordinates
-
- case ffj_t_Status_CreatedAt:
- goto handle_CreatedAt
-
- case ffj_t_Status_Entities:
- goto handle_Entities
-
- case ffj_t_Status_Favorited:
- goto handle_Favorited
-
- case ffj_t_Status_Geo:
- goto handle_Geo
-
- case ffj_t_Status_ID:
- goto handle_ID
-
- case ffj_t_Status_IDStr:
- goto handle_IDStr
-
- case ffj_t_Status_InReplyToScreenName:
- goto handle_InReplyToScreenName
-
- case ffj_t_Status_InReplyToStatusID:
- goto handle_InReplyToStatusID
-
- case ffj_t_Status_InReplyToStatusIDStr:
- goto handle_InReplyToStatusIDStr
-
- case ffj_t_Status_InReplyToUserID:
- goto handle_InReplyToUserID
-
- case ffj_t_Status_InReplyToUserIDStr:
- goto handle_InReplyToUserIDStr
-
- case ffj_t_Status_Metadata:
- goto handle_Metadata
-
- case ffj_t_Status_Place:
- goto handle_Place
-
- case ffj_t_Status_RetweetCount:
- goto handle_RetweetCount
-
- case ffj_t_Status_Retweeted:
- goto handle_Retweeted
-
- case ffj_t_Status_Source:
- goto handle_Source
-
- case ffj_t_Status_Text:
- goto handle_Text
-
- case ffj_t_Status_Truncated:
- goto handle_Truncated
-
- case ffj_t_Status_User:
- goto handle_User
-
- case ffj_t_Statusno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Contributors:
-
- /* handler: uj.Contributors type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.Contributors = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.Contributors = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Coordinates:
-
- /* handler: uj.Coordinates type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.Coordinates = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.Coordinates = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_CreatedAt:
-
- /* handler: uj.CreatedAt type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.CreatedAt = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Entities:
-
- /* handler: uj.Entities type=benchmark.Entities kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.Entities.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Favorited:
-
- /* handler: uj.Favorited type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.Favorited = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.Favorited = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Geo:
-
- /* handler: uj.Geo type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.Geo = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.Geo = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ID:
-
- /* handler: uj.ID type=int64 kind=int64 quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.ID = int64(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_IDStr:
-
- /* handler: uj.IDStr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.IDStr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InReplyToScreenName:
-
- /* handler: uj.InReplyToScreenName type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.InReplyToScreenName = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.InReplyToScreenName = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InReplyToStatusID:
-
- /* handler: uj.InReplyToStatusID type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.InReplyToStatusID = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.InReplyToStatusID = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InReplyToStatusIDStr:
-
- /* handler: uj.InReplyToStatusIDStr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.InReplyToStatusIDStr = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.InReplyToStatusIDStr = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InReplyToUserID:
-
- /* handler: uj.InReplyToUserID type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.InReplyToUserID = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.InReplyToUserID = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_InReplyToUserIDStr:
-
- /* handler: uj.InReplyToUserIDStr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.InReplyToUserIDStr = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.InReplyToUserIDStr = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Metadata:
-
- /* handler: uj.Metadata type=benchmark.StatusMetadata kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.Metadata.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Place:
-
- /* handler: uj.Place type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.Place = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.Place = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_RetweetCount:
-
- /* handler: uj.RetweetCount type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.RetweetCount = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Retweeted:
-
- /* handler: uj.Retweeted type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.Retweeted = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.Retweeted = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Source:
-
- /* handler: uj.Source type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Source = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Text:
-
- /* handler: uj.Text type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Text = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Truncated:
-
- /* handler: uj.Truncated type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.Truncated = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.Truncated = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_User:
-
- /* handler: uj.User type=benchmark.User kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.User.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *StatusMetadata) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *StatusMetadata) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"iso_language_code":`)
- fflib.WriteJsonString(buf, string(mj.IsoLanguageCode))
- buf.WriteString(`,"result_type":`)
- fflib.WriteJsonString(buf, string(mj.ResultType))
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_StatusMetadatabase = iota
- ffj_t_StatusMetadatano_such_key
-
- ffj_t_StatusMetadata_IsoLanguageCode
-
- ffj_t_StatusMetadata_ResultType
-)
-
-var ffj_key_StatusMetadata_IsoLanguageCode = []byte("iso_language_code")
-
-var ffj_key_StatusMetadata_ResultType = []byte("result_type")
-
-func (uj *StatusMetadata) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *StatusMetadata) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_StatusMetadatabase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_StatusMetadatano_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'i':
-
- if bytes.Equal(ffj_key_StatusMetadata_IsoLanguageCode, kn) {
- currentKey = ffj_t_StatusMetadata_IsoLanguageCode
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'r':
-
- if bytes.Equal(ffj_key_StatusMetadata_ResultType, kn) {
- currentKey = ffj_t_StatusMetadata_ResultType
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_StatusMetadata_ResultType, kn) {
- currentKey = ffj_t_StatusMetadata_ResultType
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_StatusMetadata_IsoLanguageCode, kn) {
- currentKey = ffj_t_StatusMetadata_IsoLanguageCode
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_StatusMetadatano_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_StatusMetadata_IsoLanguageCode:
- goto handle_IsoLanguageCode
-
- case ffj_t_StatusMetadata_ResultType:
- goto handle_ResultType
-
- case ffj_t_StatusMetadatano_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_IsoLanguageCode:
-
- /* handler: uj.IsoLanguageCode type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.IsoLanguageCode = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ResultType:
-
- /* handler: uj.ResultType type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ResultType = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *URL) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *URL) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- if mj.ExpandedURL != nil {
- buf.WriteString(`{"expanded_url":`)
- fflib.WriteJsonString(buf, string(*mj.ExpandedURL))
- } else {
- buf.WriteString(`{"expanded_url":null`)
- }
- buf.WriteString(`,"indices":`)
- if mj.Indices != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Indices {
- if i != 0 {
- buf.WriteString(`,`)
- }
- fflib.FormatBits2(buf, uint64(v), 10, v < 0)
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteString(`,"url":`)
- fflib.WriteJsonString(buf, string(mj.URL))
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_URLbase = iota
- ffj_t_URLno_such_key
-
- ffj_t_URL_ExpandedURL
-
- ffj_t_URL_Indices
-
- ffj_t_URL_URL
-)
-
-var ffj_key_URL_ExpandedURL = []byte("expanded_url")
-
-var ffj_key_URL_Indices = []byte("indices")
-
-var ffj_key_URL_URL = []byte("url")
-
-func (uj *URL) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *URL) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_URLbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_URLno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'e':
-
- if bytes.Equal(ffj_key_URL_ExpandedURL, kn) {
- currentKey = ffj_t_URL_ExpandedURL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'i':
-
- if bytes.Equal(ffj_key_URL_Indices, kn) {
- currentKey = ffj_t_URL_Indices
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'u':
-
- if bytes.Equal(ffj_key_URL_URL, kn) {
- currentKey = ffj_t_URL_URL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_URL_URL, kn) {
- currentKey = ffj_t_URL_URL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_URL_Indices, kn) {
- currentKey = ffj_t_URL_Indices
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_URL_ExpandedURL, kn) {
- currentKey = ffj_t_URL_ExpandedURL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_URLno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_URL_ExpandedURL:
- goto handle_ExpandedURL
-
- case ffj_t_URL_Indices:
- goto handle_Indices
-
- case ffj_t_URL_URL:
- goto handle_URL
-
- case ffj_t_URLno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_ExpandedURL:
-
- /* handler: uj.ExpandedURL type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.ExpandedURL = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.ExpandedURL = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Indices:
-
- /* handler: uj.Indices type=[]int kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Indices = nil
- } else {
-
- uj.Indices = make([]int, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Indices int
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Indices type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- tmp_uj__Indices = int(tval)
-
- }
- }
-
- uj.Indices = append(uj.Indices, tmp_uj__Indices)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_URL:
-
- /* handler: uj.URL type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.URL = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *User) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *User) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- if mj.ContributorsEnabled {
- buf.WriteString(`{"contributors_enabled":true`)
- } else {
- buf.WriteString(`{"contributors_enabled":false`)
- }
- buf.WriteString(`,"created_at":`)
- fflib.WriteJsonString(buf, string(mj.CreatedAt))
- if mj.DefaultProfile {
- buf.WriteString(`,"default_profile":true`)
- } else {
- buf.WriteString(`,"default_profile":false`)
- }
- if mj.DefaultProfileImage {
- buf.WriteString(`,"default_profile_image":true`)
- } else {
- buf.WriteString(`,"default_profile_image":false`)
- }
- buf.WriteString(`,"description":`)
- fflib.WriteJsonString(buf, string(mj.Description))
- buf.WriteString(`,"entities":`)
-
- {
-
- err = mj.Entities.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- buf.WriteString(`,"favourites_count":`)
- fflib.FormatBits2(buf, uint64(mj.FavouritesCount), 10, mj.FavouritesCount < 0)
- if mj.FollowRequestSent != nil {
- buf.WriteString(`,"follow_request_sent":`)
- fflib.WriteJsonString(buf, string(*mj.FollowRequestSent))
- } else {
- buf.WriteString(`,"follow_request_sent":null`)
- }
- buf.WriteString(`,"followers_count":`)
- fflib.FormatBits2(buf, uint64(mj.FollowersCount), 10, mj.FollowersCount < 0)
- if mj.Following != nil {
- buf.WriteString(`,"following":`)
- fflib.WriteJsonString(buf, string(*mj.Following))
- } else {
- buf.WriteString(`,"following":null`)
- }
- buf.WriteString(`,"friends_count":`)
- fflib.FormatBits2(buf, uint64(mj.FriendsCount), 10, mj.FriendsCount < 0)
- if mj.GeoEnabled {
- buf.WriteString(`,"geo_enabled":true`)
- } else {
- buf.WriteString(`,"geo_enabled":false`)
- }
- buf.WriteString(`,"id":`)
- fflib.FormatBits2(buf, uint64(mj.ID), 10, mj.ID < 0)
- buf.WriteString(`,"id_str":`)
- fflib.WriteJsonString(buf, string(mj.IDStr))
- if mj.IsTranslator {
- buf.WriteString(`,"is_translator":true`)
- } else {
- buf.WriteString(`,"is_translator":false`)
- }
- buf.WriteString(`,"lang":`)
- fflib.WriteJsonString(buf, string(mj.Lang))
- buf.WriteString(`,"listed_count":`)
- fflib.FormatBits2(buf, uint64(mj.ListedCount), 10, mj.ListedCount < 0)
- buf.WriteString(`,"location":`)
- fflib.WriteJsonString(buf, string(mj.Location))
- buf.WriteString(`,"name":`)
- fflib.WriteJsonString(buf, string(mj.Name))
- if mj.Notifications != nil {
- buf.WriteString(`,"notifications":`)
- fflib.WriteJsonString(buf, string(*mj.Notifications))
- } else {
- buf.WriteString(`,"notifications":null`)
- }
- buf.WriteString(`,"profile_background_color":`)
- fflib.WriteJsonString(buf, string(mj.ProfileBackgroundColor))
- buf.WriteString(`,"profile_background_image_url":`)
- fflib.WriteJsonString(buf, string(mj.ProfileBackgroundImageURL))
- buf.WriteString(`,"profile_background_image_url_https":`)
- fflib.WriteJsonString(buf, string(mj.ProfileBackgroundImageURLHTTPS))
- if mj.ProfileBackgroundTile {
- buf.WriteString(`,"profile_background_tile":true`)
- } else {
- buf.WriteString(`,"profile_background_tile":false`)
- }
- buf.WriteString(`,"profile_image_url":`)
- fflib.WriteJsonString(buf, string(mj.ProfileImageURL))
- buf.WriteString(`,"profile_image_url_https":`)
- fflib.WriteJsonString(buf, string(mj.ProfileImageURLHTTPS))
- buf.WriteString(`,"profile_link_color":`)
- fflib.WriteJsonString(buf, string(mj.ProfileLinkColor))
- buf.WriteString(`,"profile_sidebar_border_color":`)
- fflib.WriteJsonString(buf, string(mj.ProfileSidebarBorderColor))
- buf.WriteString(`,"profile_sidebar_fill_color":`)
- fflib.WriteJsonString(buf, string(mj.ProfileSidebarFillColor))
- buf.WriteString(`,"profile_text_color":`)
- fflib.WriteJsonString(buf, string(mj.ProfileTextColor))
- if mj.ProfileUseBackgroundImage {
- buf.WriteString(`,"profile_use_background_image":true`)
- } else {
- buf.WriteString(`,"profile_use_background_image":false`)
- }
- if mj.Protected {
- buf.WriteString(`,"protected":true`)
- } else {
- buf.WriteString(`,"protected":false`)
- }
- buf.WriteString(`,"screen_name":`)
- fflib.WriteJsonString(buf, string(mj.ScreenName))
- if mj.ShowAllInlineMedia {
- buf.WriteString(`,"show_all_inline_media":true`)
- } else {
- buf.WriteString(`,"show_all_inline_media":false`)
- }
- buf.WriteString(`,"statuses_count":`)
- fflib.FormatBits2(buf, uint64(mj.StatusesCount), 10, mj.StatusesCount < 0)
- buf.WriteString(`,"time_zone":`)
- fflib.WriteJsonString(buf, string(mj.TimeZone))
- if mj.URL != nil {
- buf.WriteString(`,"url":`)
- fflib.WriteJsonString(buf, string(*mj.URL))
- } else {
- buf.WriteString(`,"url":null`)
- }
- buf.WriteString(`,"utc_offset":`)
- fflib.FormatBits2(buf, uint64(mj.UtcOffset), 10, mj.UtcOffset < 0)
- if mj.Verified {
- buf.WriteString(`,"verified":true`)
- } else {
- buf.WriteString(`,"verified":false`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_Userbase = iota
- ffj_t_Userno_such_key
-
- ffj_t_User_ContributorsEnabled
-
- ffj_t_User_CreatedAt
-
- ffj_t_User_DefaultProfile
-
- ffj_t_User_DefaultProfileImage
-
- ffj_t_User_Description
-
- ffj_t_User_Entities
-
- ffj_t_User_FavouritesCount
-
- ffj_t_User_FollowRequestSent
-
- ffj_t_User_FollowersCount
-
- ffj_t_User_Following
-
- ffj_t_User_FriendsCount
-
- ffj_t_User_GeoEnabled
-
- ffj_t_User_ID
-
- ffj_t_User_IDStr
-
- ffj_t_User_IsTranslator
-
- ffj_t_User_Lang
-
- ffj_t_User_ListedCount
-
- ffj_t_User_Location
-
- ffj_t_User_Name
-
- ffj_t_User_Notifications
-
- ffj_t_User_ProfileBackgroundColor
-
- ffj_t_User_ProfileBackgroundImageURL
-
- ffj_t_User_ProfileBackgroundImageURLHTTPS
-
- ffj_t_User_ProfileBackgroundTile
-
- ffj_t_User_ProfileImageURL
-
- ffj_t_User_ProfileImageURLHTTPS
-
- ffj_t_User_ProfileLinkColor
-
- ffj_t_User_ProfileSidebarBorderColor
-
- ffj_t_User_ProfileSidebarFillColor
-
- ffj_t_User_ProfileTextColor
-
- ffj_t_User_ProfileUseBackgroundImage
-
- ffj_t_User_Protected
-
- ffj_t_User_ScreenName
-
- ffj_t_User_ShowAllInlineMedia
-
- ffj_t_User_StatusesCount
-
- ffj_t_User_TimeZone
-
- ffj_t_User_URL
-
- ffj_t_User_UtcOffset
-
- ffj_t_User_Verified
-)
-
-var ffj_key_User_ContributorsEnabled = []byte("contributors_enabled")
-
-var ffj_key_User_CreatedAt = []byte("created_at")
-
-var ffj_key_User_DefaultProfile = []byte("default_profile")
-
-var ffj_key_User_DefaultProfileImage = []byte("default_profile_image")
-
-var ffj_key_User_Description = []byte("description")
-
-var ffj_key_User_Entities = []byte("entities")
-
-var ffj_key_User_FavouritesCount = []byte("favourites_count")
-
-var ffj_key_User_FollowRequestSent = []byte("follow_request_sent")
-
-var ffj_key_User_FollowersCount = []byte("followers_count")
-
-var ffj_key_User_Following = []byte("following")
-
-var ffj_key_User_FriendsCount = []byte("friends_count")
-
-var ffj_key_User_GeoEnabled = []byte("geo_enabled")
-
-var ffj_key_User_ID = []byte("id")
-
-var ffj_key_User_IDStr = []byte("id_str")
-
-var ffj_key_User_IsTranslator = []byte("is_translator")
-
-var ffj_key_User_Lang = []byte("lang")
-
-var ffj_key_User_ListedCount = []byte("listed_count")
-
-var ffj_key_User_Location = []byte("location")
-
-var ffj_key_User_Name = []byte("name")
-
-var ffj_key_User_Notifications = []byte("notifications")
-
-var ffj_key_User_ProfileBackgroundColor = []byte("profile_background_color")
-
-var ffj_key_User_ProfileBackgroundImageURL = []byte("profile_background_image_url")
-
-var ffj_key_User_ProfileBackgroundImageURLHTTPS = []byte("profile_background_image_url_https")
-
-var ffj_key_User_ProfileBackgroundTile = []byte("profile_background_tile")
-
-var ffj_key_User_ProfileImageURL = []byte("profile_image_url")
-
-var ffj_key_User_ProfileImageURLHTTPS = []byte("profile_image_url_https")
-
-var ffj_key_User_ProfileLinkColor = []byte("profile_link_color")
-
-var ffj_key_User_ProfileSidebarBorderColor = []byte("profile_sidebar_border_color")
-
-var ffj_key_User_ProfileSidebarFillColor = []byte("profile_sidebar_fill_color")
-
-var ffj_key_User_ProfileTextColor = []byte("profile_text_color")
-
-var ffj_key_User_ProfileUseBackgroundImage = []byte("profile_use_background_image")
-
-var ffj_key_User_Protected = []byte("protected")
-
-var ffj_key_User_ScreenName = []byte("screen_name")
-
-var ffj_key_User_ShowAllInlineMedia = []byte("show_all_inline_media")
-
-var ffj_key_User_StatusesCount = []byte("statuses_count")
-
-var ffj_key_User_TimeZone = []byte("time_zone")
-
-var ffj_key_User_URL = []byte("url")
-
-var ffj_key_User_UtcOffset = []byte("utc_offset")
-
-var ffj_key_User_Verified = []byte("verified")
-
-func (uj *User) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *User) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_Userbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_Userno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'c':
-
- if bytes.Equal(ffj_key_User_ContributorsEnabled, kn) {
- currentKey = ffj_t_User_ContributorsEnabled
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_CreatedAt, kn) {
- currentKey = ffj_t_User_CreatedAt
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'd':
-
- if bytes.Equal(ffj_key_User_DefaultProfile, kn) {
- currentKey = ffj_t_User_DefaultProfile
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_DefaultProfileImage, kn) {
- currentKey = ffj_t_User_DefaultProfileImage
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_Description, kn) {
- currentKey = ffj_t_User_Description
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'e':
-
- if bytes.Equal(ffj_key_User_Entities, kn) {
- currentKey = ffj_t_User_Entities
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'f':
-
- if bytes.Equal(ffj_key_User_FavouritesCount, kn) {
- currentKey = ffj_t_User_FavouritesCount
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_FollowRequestSent, kn) {
- currentKey = ffj_t_User_FollowRequestSent
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_FollowersCount, kn) {
- currentKey = ffj_t_User_FollowersCount
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_Following, kn) {
- currentKey = ffj_t_User_Following
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_FriendsCount, kn) {
- currentKey = ffj_t_User_FriendsCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'g':
-
- if bytes.Equal(ffj_key_User_GeoEnabled, kn) {
- currentKey = ffj_t_User_GeoEnabled
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'i':
-
- if bytes.Equal(ffj_key_User_ID, kn) {
- currentKey = ffj_t_User_ID
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_IDStr, kn) {
- currentKey = ffj_t_User_IDStr
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_IsTranslator, kn) {
- currentKey = ffj_t_User_IsTranslator
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'l':
-
- if bytes.Equal(ffj_key_User_Lang, kn) {
- currentKey = ffj_t_User_Lang
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ListedCount, kn) {
- currentKey = ffj_t_User_ListedCount
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_Location, kn) {
- currentKey = ffj_t_User_Location
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'n':
-
- if bytes.Equal(ffj_key_User_Name, kn) {
- currentKey = ffj_t_User_Name
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_Notifications, kn) {
- currentKey = ffj_t_User_Notifications
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'p':
-
- if bytes.Equal(ffj_key_User_ProfileBackgroundColor, kn) {
- currentKey = ffj_t_User_ProfileBackgroundColor
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileBackgroundImageURL, kn) {
- currentKey = ffj_t_User_ProfileBackgroundImageURL
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileBackgroundImageURLHTTPS, kn) {
- currentKey = ffj_t_User_ProfileBackgroundImageURLHTTPS
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileBackgroundTile, kn) {
- currentKey = ffj_t_User_ProfileBackgroundTile
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileImageURL, kn) {
- currentKey = ffj_t_User_ProfileImageURL
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileImageURLHTTPS, kn) {
- currentKey = ffj_t_User_ProfileImageURLHTTPS
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileLinkColor, kn) {
- currentKey = ffj_t_User_ProfileLinkColor
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileSidebarBorderColor, kn) {
- currentKey = ffj_t_User_ProfileSidebarBorderColor
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileSidebarFillColor, kn) {
- currentKey = ffj_t_User_ProfileSidebarFillColor
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileTextColor, kn) {
- currentKey = ffj_t_User_ProfileTextColor
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ProfileUseBackgroundImage, kn) {
- currentKey = ffj_t_User_ProfileUseBackgroundImage
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_Protected, kn) {
- currentKey = ffj_t_User_Protected
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 's':
-
- if bytes.Equal(ffj_key_User_ScreenName, kn) {
- currentKey = ffj_t_User_ScreenName
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_ShowAllInlineMedia, kn) {
- currentKey = ffj_t_User_ShowAllInlineMedia
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_StatusesCount, kn) {
- currentKey = ffj_t_User_StatusesCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 't':
-
- if bytes.Equal(ffj_key_User_TimeZone, kn) {
- currentKey = ffj_t_User_TimeZone
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'u':
-
- if bytes.Equal(ffj_key_User_URL, kn) {
- currentKey = ffj_t_User_URL
- state = fflib.FFParse_want_colon
- goto mainparse
-
- } else if bytes.Equal(ffj_key_User_UtcOffset, kn) {
- currentKey = ffj_t_User_UtcOffset
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'v':
-
- if bytes.Equal(ffj_key_User_Verified, kn) {
- currentKey = ffj_t_User_Verified
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_Verified, kn) {
- currentKey = ffj_t_User_Verified
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_UtcOffset, kn) {
- currentKey = ffj_t_User_UtcOffset
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_URL, kn) {
- currentKey = ffj_t_User_URL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_TimeZone, kn) {
- currentKey = ffj_t_User_TimeZone
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_StatusesCount, kn) {
- currentKey = ffj_t_User_StatusesCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ShowAllInlineMedia, kn) {
- currentKey = ffj_t_User_ShowAllInlineMedia
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ScreenName, kn) {
- currentKey = ffj_t_User_ScreenName
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_Protected, kn) {
- currentKey = ffj_t_User_Protected
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileUseBackgroundImage, kn) {
- currentKey = ffj_t_User_ProfileUseBackgroundImage
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_ProfileTextColor, kn) {
- currentKey = ffj_t_User_ProfileTextColor
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileSidebarFillColor, kn) {
- currentKey = ffj_t_User_ProfileSidebarFillColor
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileSidebarBorderColor, kn) {
- currentKey = ffj_t_User_ProfileSidebarBorderColor
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileLinkColor, kn) {
- currentKey = ffj_t_User_ProfileLinkColor
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileImageURLHTTPS, kn) {
- currentKey = ffj_t_User_ProfileImageURLHTTPS
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_ProfileImageURL, kn) {
- currentKey = ffj_t_User_ProfileImageURL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileBackgroundTile, kn) {
- currentKey = ffj_t_User_ProfileBackgroundTile
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileBackgroundImageURLHTTPS, kn) {
- currentKey = ffj_t_User_ProfileBackgroundImageURLHTTPS
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileBackgroundImageURL, kn) {
- currentKey = ffj_t_User_ProfileBackgroundImageURL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ProfileBackgroundColor, kn) {
- currentKey = ffj_t_User_ProfileBackgroundColor
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_Notifications, kn) {
- currentKey = ffj_t_User_Notifications
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_Name, kn) {
- currentKey = ffj_t_User_Name
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_Location, kn) {
- currentKey = ffj_t_User_Location
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ListedCount, kn) {
- currentKey = ffj_t_User_ListedCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_Lang, kn) {
- currentKey = ffj_t_User_Lang
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_IsTranslator, kn) {
- currentKey = ffj_t_User_IsTranslator
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_IDStr, kn) {
- currentKey = ffj_t_User_IDStr
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_ID, kn) {
- currentKey = ffj_t_User_ID
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_GeoEnabled, kn) {
- currentKey = ffj_t_User_GeoEnabled
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_FriendsCount, kn) {
- currentKey = ffj_t_User_FriendsCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_User_Following, kn) {
- currentKey = ffj_t_User_Following
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_FollowersCount, kn) {
- currentKey = ffj_t_User_FollowersCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_FollowRequestSent, kn) {
- currentKey = ffj_t_User_FollowRequestSent
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_FavouritesCount, kn) {
- currentKey = ffj_t_User_FavouritesCount
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_Entities, kn) {
- currentKey = ffj_t_User_Entities
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_Description, kn) {
- currentKey = ffj_t_User_Description
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_DefaultProfileImage, kn) {
- currentKey = ffj_t_User_DefaultProfileImage
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_DefaultProfile, kn) {
- currentKey = ffj_t_User_DefaultProfile
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.AsciiEqualFold(ffj_key_User_CreatedAt, kn) {
- currentKey = ffj_t_User_CreatedAt
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_User_ContributorsEnabled, kn) {
- currentKey = ffj_t_User_ContributorsEnabled
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_Userno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_User_ContributorsEnabled:
- goto handle_ContributorsEnabled
-
- case ffj_t_User_CreatedAt:
- goto handle_CreatedAt
-
- case ffj_t_User_DefaultProfile:
- goto handle_DefaultProfile
-
- case ffj_t_User_DefaultProfileImage:
- goto handle_DefaultProfileImage
-
- case ffj_t_User_Description:
- goto handle_Description
-
- case ffj_t_User_Entities:
- goto handle_Entities
-
- case ffj_t_User_FavouritesCount:
- goto handle_FavouritesCount
-
- case ffj_t_User_FollowRequestSent:
- goto handle_FollowRequestSent
-
- case ffj_t_User_FollowersCount:
- goto handle_FollowersCount
-
- case ffj_t_User_Following:
- goto handle_Following
-
- case ffj_t_User_FriendsCount:
- goto handle_FriendsCount
-
- case ffj_t_User_GeoEnabled:
- goto handle_GeoEnabled
-
- case ffj_t_User_ID:
- goto handle_ID
-
- case ffj_t_User_IDStr:
- goto handle_IDStr
-
- case ffj_t_User_IsTranslator:
- goto handle_IsTranslator
-
- case ffj_t_User_Lang:
- goto handle_Lang
-
- case ffj_t_User_ListedCount:
- goto handle_ListedCount
-
- case ffj_t_User_Location:
- goto handle_Location
-
- case ffj_t_User_Name:
- goto handle_Name
-
- case ffj_t_User_Notifications:
- goto handle_Notifications
-
- case ffj_t_User_ProfileBackgroundColor:
- goto handle_ProfileBackgroundColor
-
- case ffj_t_User_ProfileBackgroundImageURL:
- goto handle_ProfileBackgroundImageURL
-
- case ffj_t_User_ProfileBackgroundImageURLHTTPS:
- goto handle_ProfileBackgroundImageURLHTTPS
-
- case ffj_t_User_ProfileBackgroundTile:
- goto handle_ProfileBackgroundTile
-
- case ffj_t_User_ProfileImageURL:
- goto handle_ProfileImageURL
-
- case ffj_t_User_ProfileImageURLHTTPS:
- goto handle_ProfileImageURLHTTPS
-
- case ffj_t_User_ProfileLinkColor:
- goto handle_ProfileLinkColor
-
- case ffj_t_User_ProfileSidebarBorderColor:
- goto handle_ProfileSidebarBorderColor
-
- case ffj_t_User_ProfileSidebarFillColor:
- goto handle_ProfileSidebarFillColor
-
- case ffj_t_User_ProfileTextColor:
- goto handle_ProfileTextColor
-
- case ffj_t_User_ProfileUseBackgroundImage:
- goto handle_ProfileUseBackgroundImage
-
- case ffj_t_User_Protected:
- goto handle_Protected
-
- case ffj_t_User_ScreenName:
- goto handle_ScreenName
-
- case ffj_t_User_ShowAllInlineMedia:
- goto handle_ShowAllInlineMedia
-
- case ffj_t_User_StatusesCount:
- goto handle_StatusesCount
-
- case ffj_t_User_TimeZone:
- goto handle_TimeZone
-
- case ffj_t_User_URL:
- goto handle_URL
-
- case ffj_t_User_UtcOffset:
- goto handle_UtcOffset
-
- case ffj_t_User_Verified:
- goto handle_Verified
-
- case ffj_t_Userno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_ContributorsEnabled:
-
- /* handler: uj.ContributorsEnabled type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.ContributorsEnabled = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.ContributorsEnabled = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_CreatedAt:
-
- /* handler: uj.CreatedAt type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.CreatedAt = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_DefaultProfile:
-
- /* handler: uj.DefaultProfile type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.DefaultProfile = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.DefaultProfile = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_DefaultProfileImage:
-
- /* handler: uj.DefaultProfileImage type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.DefaultProfileImage = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.DefaultProfileImage = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Description:
-
- /* handler: uj.Description type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Description = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Entities:
-
- /* handler: uj.Entities type=benchmark.UserEntities kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.Entities.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_FavouritesCount:
-
- /* handler: uj.FavouritesCount type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.FavouritesCount = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_FollowRequestSent:
-
- /* handler: uj.FollowRequestSent type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.FollowRequestSent = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.FollowRequestSent = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_FollowersCount:
-
- /* handler: uj.FollowersCount type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.FollowersCount = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Following:
-
- /* handler: uj.Following type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.Following = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.Following = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_FriendsCount:
-
- /* handler: uj.FriendsCount type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.FriendsCount = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_GeoEnabled:
-
- /* handler: uj.GeoEnabled type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.GeoEnabled = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.GeoEnabled = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ID:
-
- /* handler: uj.ID type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.ID = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_IDStr:
-
- /* handler: uj.IDStr type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.IDStr = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_IsTranslator:
-
- /* handler: uj.IsTranslator type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.IsTranslator = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.IsTranslator = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Lang:
-
- /* handler: uj.Lang type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Lang = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ListedCount:
-
- /* handler: uj.ListedCount type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.ListedCount = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Location:
-
- /* handler: uj.Location type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Location = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Name:
-
- /* handler: uj.Name type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.Name = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Notifications:
-
- /* handler: uj.Notifications type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.Notifications = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.Notifications = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileBackgroundColor:
-
- /* handler: uj.ProfileBackgroundColor type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileBackgroundColor = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileBackgroundImageURL:
-
- /* handler: uj.ProfileBackgroundImageURL type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileBackgroundImageURL = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileBackgroundImageURLHTTPS:
-
- /* handler: uj.ProfileBackgroundImageURLHTTPS type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileBackgroundImageURLHTTPS = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileBackgroundTile:
-
- /* handler: uj.ProfileBackgroundTile type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.ProfileBackgroundTile = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.ProfileBackgroundTile = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileImageURL:
-
- /* handler: uj.ProfileImageURL type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileImageURL = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileImageURLHTTPS:
-
- /* handler: uj.ProfileImageURLHTTPS type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileImageURLHTTPS = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileLinkColor:
-
- /* handler: uj.ProfileLinkColor type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileLinkColor = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileSidebarBorderColor:
-
- /* handler: uj.ProfileSidebarBorderColor type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileSidebarBorderColor = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileSidebarFillColor:
-
- /* handler: uj.ProfileSidebarFillColor type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileSidebarFillColor = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileTextColor:
-
- /* handler: uj.ProfileTextColor type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ProfileTextColor = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ProfileUseBackgroundImage:
-
- /* handler: uj.ProfileUseBackgroundImage type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.ProfileUseBackgroundImage = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.ProfileUseBackgroundImage = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Protected:
-
- /* handler: uj.Protected type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.Protected = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.Protected = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ScreenName:
-
- /* handler: uj.ScreenName type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.ScreenName = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_ShowAllInlineMedia:
-
- /* handler: uj.ShowAllInlineMedia type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.ShowAllInlineMedia = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.ShowAllInlineMedia = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_StatusesCount:
-
- /* handler: uj.StatusesCount type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.StatusesCount = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_TimeZone:
-
- /* handler: uj.TimeZone type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- outBuf := fs.Output.Bytes()
-
- uj.TimeZone = string(string(outBuf))
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_URL:
-
- /* handler: uj.URL type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- uj.URL = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- uj.URL = &tval
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_UtcOffset:
-
- /* handler: uj.UtcOffset type=int kind=int quoted=false*/
-
- {
- if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
- }
- }
-
- {
-
- if tok == fflib.FFTok_null {
-
- } else {
-
- tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
-
- if err != nil {
- return fs.WrapErr(err)
- }
-
- uj.UtcOffset = int(tval)
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_Verified:
-
- /* handler: uj.Verified type=bool kind=bool quoted=false*/
-
- {
- if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
- }
- }
-
- {
- if tok == fflib.FFTok_null {
-
- } else {
- tmpb := fs.Output.Bytes()
-
- if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
-
- uj.Verified = true
-
- } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
-
- uj.Verified = false
-
- } else {
- err = errors.New("unexpected bytes for true/false value")
- return fs.WrapErr(err)
- }
-
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *UserEntities) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *UserEntities) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"description":`)
-
- {
-
- err = mj.Description.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- buf.WriteString(`,"url":`)
-
- {
-
- err = mj.URL.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_UserEntitiesbase = iota
- ffj_t_UserEntitiesno_such_key
-
- ffj_t_UserEntities_Description
-
- ffj_t_UserEntities_URL
-)
-
-var ffj_key_UserEntities_Description = []byte("description")
-
-var ffj_key_UserEntities_URL = []byte("url")
-
-func (uj *UserEntities) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *UserEntities) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_UserEntitiesbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_UserEntitiesno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'd':
-
- if bytes.Equal(ffj_key_UserEntities_Description, kn) {
- currentKey = ffj_t_UserEntities_Description
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case 'u':
-
- if bytes.Equal(ffj_key_UserEntities_URL, kn) {
- currentKey = ffj_t_UserEntities_URL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_UserEntities_URL, kn) {
- currentKey = ffj_t_UserEntities_URL
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- if fflib.EqualFoldRight(ffj_key_UserEntities_Description, kn) {
- currentKey = ffj_t_UserEntities_Description
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_UserEntitiesno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_UserEntities_Description:
- goto handle_Description
-
- case ffj_t_UserEntities_URL:
- goto handle_URL
-
- case ffj_t_UserEntitiesno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Description:
-
- /* handler: uj.Description type=benchmark.UserEntityDescription kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.Description.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-handle_URL:
-
- /* handler: uj.URL type=benchmark.UserEntityURL kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = uj.URL.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *UserEntityDescription) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *UserEntityDescription) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"urls":`)
- if mj.Urls != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Urls {
- if i != 0 {
- buf.WriteString(`,`)
- }
- if v != nil {
- fflib.WriteJsonString(buf, string(*v))
- } else {
- buf.WriteString(`null`)
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_UserEntityDescriptionbase = iota
- ffj_t_UserEntityDescriptionno_such_key
-
- ffj_t_UserEntityDescription_Urls
-)
-
-var ffj_key_UserEntityDescription_Urls = []byte("urls")
-
-func (uj *UserEntityDescription) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *UserEntityDescription) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_UserEntityDescriptionbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_UserEntityDescriptionno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'u':
-
- if bytes.Equal(ffj_key_UserEntityDescription_Urls, kn) {
- currentKey = ffj_t_UserEntityDescription_Urls
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_UserEntityDescription_Urls, kn) {
- currentKey = ffj_t_UserEntityDescription_Urls
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_UserEntityDescriptionno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_UserEntityDescription_Urls:
- goto handle_Urls
-
- case ffj_t_UserEntityDescriptionno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Urls:
-
- /* handler: uj.Urls type=[]*string kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Urls = nil
- } else {
-
- uj.Urls = make([]*string, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Urls *string
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Urls type=*string kind=ptr quoted=false*/
-
- {
-
- if tok == fflib.FFTok_null {
- tmp_uj__Urls = nil
- } else {
- if tmp_uj__Urls == nil {
- tmp_uj__Urls = new(string)
- }
-
- /* handler: tmp_uj__Urls type=string kind=string quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
-
- tmp_uj__Urls = nil
-
- } else {
-
- var tval string
- outBuf := fs.Output.Bytes()
-
- tval = string(string(outBuf))
- tmp_uj__Urls = &tval
-
- }
- }
-
- }
- }
-
- uj.Urls = append(uj.Urls, tmp_uj__Urls)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *UserEntityURL) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *UserEntityURL) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"urls":`)
- if mj.Urls != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Urls {
- if i != 0 {
- buf.WriteString(`,`)
- }
-
- {
-
- err = v.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_UserEntityURLbase = iota
- ffj_t_UserEntityURLno_such_key
-
- ffj_t_UserEntityURL_Urls
-)
-
-var ffj_key_UserEntityURL_Urls = []byte("urls")
-
-func (uj *UserEntityURL) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *UserEntityURL) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_UserEntityURLbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_UserEntityURLno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'u':
-
- if bytes.Equal(ffj_key_UserEntityURL_Urls, kn) {
- currentKey = ffj_t_UserEntityURL_Urls
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.EqualFoldRight(ffj_key_UserEntityURL_Urls, kn) {
- currentKey = ffj_t_UserEntityURL_Urls
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_UserEntityURLno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_UserEntityURL_Urls:
- goto handle_Urls
-
- case ffj_t_UserEntityURLno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Urls:
-
- /* handler: uj.Urls type=[]benchmark.URL kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Urls = nil
- } else {
-
- uj.Urls = make([]URL, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Urls URL
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Urls type=benchmark.URL kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = tmp_uj__Urls.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- uj.Urls = append(uj.Urls, tmp_uj__Urls)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
-
-func (mj *XLStruct) MarshalJSON() ([]byte, error) {
- var buf fflib.Buffer
- if mj == nil {
- buf.WriteString("null")
- return buf.Bytes(), nil
- }
- err := mj.MarshalJSONBuf(&buf)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-func (mj *XLStruct) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
- if mj == nil {
- buf.WriteString("null")
- return nil
- }
- var err error
- var obj []byte
- _ = obj
- _ = err
- buf.WriteString(`{"Data":`)
- if mj.Data != nil {
- buf.WriteString(`[`)
- for i, v := range mj.Data {
- if i != 0 {
- buf.WriteString(`,`)
- }
-
- {
-
- err = v.MarshalJSONBuf(buf)
- if err != nil {
- return err
- }
-
- }
- }
- buf.WriteString(`]`)
- } else {
- buf.WriteString(`null`)
- }
- buf.WriteByte('}')
- return nil
-}
-
-const (
- ffj_t_XLStructbase = iota
- ffj_t_XLStructno_such_key
-
- ffj_t_XLStruct_Data
-)
-
-var ffj_key_XLStruct_Data = []byte("Data")
-
-func (uj *XLStruct) UnmarshalJSON(input []byte) error {
- fs := fflib.NewFFLexer(input)
- return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
-}
-
-func (uj *XLStruct) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
- var err error = nil
- currentKey := ffj_t_XLStructbase
- _ = currentKey
- tok := fflib.FFTok_init
- wantedTok := fflib.FFTok_init
-
-mainparse:
- for {
- tok = fs.Scan()
- // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
- if tok == fflib.FFTok_error {
- goto tokerror
- }
-
- switch state {
-
- case fflib.FFParse_map_start:
- if tok != fflib.FFTok_left_bracket {
- wantedTok = fflib.FFTok_left_bracket
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_key
- continue
-
- case fflib.FFParse_after_value:
- if tok == fflib.FFTok_comma {
- state = fflib.FFParse_want_key
- } else if tok == fflib.FFTok_right_bracket {
- goto done
- } else {
- wantedTok = fflib.FFTok_comma
- goto wrongtokenerror
- }
-
- case fflib.FFParse_want_key:
- // json {} ended. goto exit. woo.
- if tok == fflib.FFTok_right_bracket {
- goto done
- }
- if tok != fflib.FFTok_string {
- wantedTok = fflib.FFTok_string
- goto wrongtokenerror
- }
-
- kn := fs.Output.Bytes()
- if len(kn) <= 0 {
- // "" case. hrm.
- currentKey = ffj_t_XLStructno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- } else {
- switch kn[0] {
-
- case 'D':
-
- if bytes.Equal(ffj_key_XLStruct_Data, kn) {
- currentKey = ffj_t_XLStruct_Data
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- }
-
- if fflib.SimpleLetterEqualFold(ffj_key_XLStruct_Data, kn) {
- currentKey = ffj_t_XLStruct_Data
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- currentKey = ffj_t_XLStructno_such_key
- state = fflib.FFParse_want_colon
- goto mainparse
- }
-
- case fflib.FFParse_want_colon:
- if tok != fflib.FFTok_colon {
- wantedTok = fflib.FFTok_colon
- goto wrongtokenerror
- }
- state = fflib.FFParse_want_value
- continue
- case fflib.FFParse_want_value:
-
- if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
- switch currentKey {
-
- case ffj_t_XLStruct_Data:
- goto handle_Data
-
- case ffj_t_XLStructno_such_key:
- err = fs.SkipField(tok)
- if err != nil {
- return fs.WrapErr(err)
- }
- state = fflib.FFParse_after_value
- goto mainparse
- }
- } else {
- goto wantedvalue
- }
- }
- }
-
-handle_Data:
-
- /* handler: uj.Data type=[]benchmark.LargeStruct kind=slice quoted=false*/
-
- {
-
- {
- if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null {
- return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok))
- }
- }
-
- if tok == fflib.FFTok_null {
- uj.Data = nil
- } else {
-
- uj.Data = make([]LargeStruct, 0)
-
- wantVal := true
-
- for {
-
- var tmp_uj__Data LargeStruct
-
- tok = fs.Scan()
- if tok == fflib.FFTok_error {
- goto tokerror
- }
- if tok == fflib.FFTok_right_brace {
- break
- }
-
- if tok == fflib.FFTok_comma {
- if wantVal == true {
- // TODO(pquerna): this isn't an ideal error message, this handles
- // things like [,,,] as an array value.
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
- }
- continue
- } else {
- wantVal = true
- }
-
- /* handler: tmp_uj__Data type=benchmark.LargeStruct kind=struct quoted=false*/
-
- {
- if tok == fflib.FFTok_null {
-
- state = fflib.FFParse_after_value
- goto mainparse
- }
-
- err = tmp_uj__Data.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key)
- if err != nil {
- return err
- }
- state = fflib.FFParse_after_value
- }
-
- uj.Data = append(uj.Data, tmp_uj__Data)
- wantVal = false
- }
- }
- }
-
- state = fflib.FFParse_after_value
- goto mainparse
-
-wantedvalue:
- return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
-wrongtokenerror:
- return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
-tokerror:
- if fs.BigError != nil {
- return fs.WrapErr(fs.BigError)
- }
- err = fs.Error.ToError()
- if err != nil {
- return fs.WrapErr(err)
- }
- panic("ffjson-generated: unreachable, please report bug.")
-done:
- return nil
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/data_var.go b/vendor/github.com/mailru/easyjson/benchmark/data_var.go
deleted file mode 100644
index ea4202dbe..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/data_var.go
+++ /dev/null
@@ -1,350 +0,0 @@
-package benchmark
-
-var largeStructData = LargeStruct{
- SearchMetadata: SearchMetadata{
- CompletedIn: 0.035,
- Count: 4,
- MaxID: 250126199840518145,
- MaxIDStr: "250126199840518145",
- NextResults: "?max_id=249279667666817023&q=%23freebandnames&count=4&include_entities=1&result_type=mixed",
- Query: "%23freebandnames",
- RefreshURL: "?since_id=250126199840518145&q=%23freebandnames&result_type=mixed&include_entities=1",
- SinceID: 24012619984051000,
- SinceIDStr: "24012619984051000",
- },
- Statuses: []Status{
- {
- Contributors: nil,
- Coordinates: nil,
- CreatedAt: "Mon Sep 24 03:35:21 +0000 2012",
- Entities: Entities{
- Hashtags: []Hashtag{{
- Indices: []int{20, 34},
- Text: "freebandnames"},
- },
- Urls: []*string{},
- UserMentions: []*string{},
- },
- Favorited: false,
- Geo: nil,
- ID: 250075927172759552,
- IDStr: "250075927172759552",
- InReplyToScreenName: nil,
- InReplyToStatusID: nil,
- InReplyToStatusIDStr: nil,
- InReplyToUserID: nil,
- InReplyToUserIDStr: nil,
- Metadata: StatusMetadata{
- IsoLanguageCode: "en",
- ResultType: "recent",
- },
- Place: nil,
- RetweetCount: 0,
- Retweeted: false,
- Source: "<a href=\"//itunes.apple.com/us/app/twitter/id409789998?mt=12%5C%22\" rel=\"\\\"nofollow\\\"\">Twitter for Mac</a>",
- Text: "Aggressive Ponytail #freebandnames",
- Truncated: false,
- User: User{
- ContributorsEnabled: false,
- CreatedAt: "Mon Apr 26 06:01:55 +0000 2010",
- DefaultProfile: true,
- DefaultProfileImage: false,
- Description: "Born 330 Live 310",
- Entities: UserEntities{
- Description: UserEntityDescription{
- Urls: []*string{},
- },
- URL: UserEntityURL{
- Urls: []URL{{
- ExpandedURL: nil,
- Indices: []int{0, 0},
- URL: "",
- }},
- },
- },
- FavouritesCount: 0,
- FollowRequestSent: nil,
- FollowersCount: 70,
- Following: nil,
- FriendsCount: 110,
- GeoEnabled: true,
- ID: 137238150,
- IDStr: "137238150",
- IsTranslator: false,
- Lang: "en",
- ListedCount: 2,
- Location: "LA, CA",
- Name: "Sean Cummings",
- Notifications: nil,
- ProfileBackgroundColor: "C0DEED",
- ProfileBackgroundImageURL: "http://a0.twimg.com/images/themes/theme1/bg.png",
- ProfileBackgroundImageURLHTTPS: "https://si0.twimg.com/images/themes/theme1/bg.png",
- ProfileBackgroundTile: false,
- ProfileImageURL: "http://a0.twimg.com/profile_images/2359746665/1v6zfgqo8g0d3mk7ii5s_normal.jpeg",
- ProfileImageURLHTTPS: "https://si0.twimg.com/profile_images/2359746665/1v6zfgqo8g0d3mk7ii5s_normal.jpeg",
- ProfileLinkColor: "0084B4",
- ProfileSidebarBorderColor: "C0DEED",
- ProfileSidebarFillColor: "DDEEF6",
- ProfileTextColor: "333333",
- ProfileUseBackgroundImage: true,
- Protected: false,
- ScreenName: "sean_cummings",
- ShowAllInlineMedia: false,
- StatusesCount: 579,
- TimeZone: "Pacific Time (US & Canada)",
- URL: nil,
- UtcOffset: -28800,
- Verified: false,
- },
- },
- {
- Contributors: nil,
- Coordinates: nil,
- CreatedAt: "Fri Sep 21 23:40:54 +0000 2012",
- Entities: Entities{
- Hashtags: []Hashtag{{
- Indices: []int{20, 34},
- Text: "FreeBandNames",
- }},
- Urls: []*string{},
- UserMentions: []*string{},
- },
- Favorited: false,
- Geo: nil,
- ID: 249292149810667520,
- IDStr: "249292149810667520",
- InReplyToScreenName: nil,
- InReplyToStatusID: nil,
- InReplyToStatusIDStr: nil,
- InReplyToUserID: nil,
- InReplyToUserIDStr: nil,
- Metadata: StatusMetadata{
- IsoLanguageCode: "pl",
- ResultType: "recent",
- },
- Place: nil,
- RetweetCount: 0,
- Retweeted: false,
- Source: "web",
- Text: "Thee Namaste Nerdz. #FreeBandNames",
- Truncated: false,
- User: User{
- ContributorsEnabled: false,
- CreatedAt: "Tue Apr 07 19:05:07 +0000 2009",
- DefaultProfile: false,
- DefaultProfileImage: false,
- Description: "You will come to Durham, North Carolina. I will sell you some records then, here in Durham, North Carolina. Fun will happen.",
- Entities: UserEntities{
- Description: UserEntityDescription{Urls: []*string{}},
- URL: UserEntityURL{
- Urls: []URL{{
- ExpandedURL: nil,
- Indices: []int{0, 32},
- URL: "http://bullcityrecords.com/wnng/"}},
- },
- },
- FavouritesCount: 8,
- FollowRequestSent: nil,
- FollowersCount: 2052,
- Following: nil,
- FriendsCount: 348,
- GeoEnabled: false,
- ID: 29516238,
- IDStr: "29516238",
- IsTranslator: false,
- Lang: "en",
- ListedCount: 118,
- Location: "Durham, NC",
- Name: "Chaz Martenstein",
- Notifications: nil,
- ProfileBackgroundColor: "9AE4E8",
- ProfileBackgroundImageURL: "http://a0.twimg.com/profile_background_images/9423277/background_tile.bmp",
- ProfileBackgroundImageURLHTTPS: "https://si0.twimg.com/profile_background_images/9423277/background_tile.bmp",
- ProfileBackgroundTile: true,
- ProfileImageURL: "http://a0.twimg.com/profile_images/447958234/Lichtenstein_normal.jpg",
- ProfileImageURLHTTPS: "https://si0.twimg.com/profile_images/447958234/Lichtenstein_normal.jpg",
- ProfileLinkColor: "0084B4",
- ProfileSidebarBorderColor: "BDDCAD",
- ProfileSidebarFillColor: "DDFFCC",
- ProfileTextColor: "333333",
- ProfileUseBackgroundImage: true,
- Protected: false,
- ScreenName: "bullcityrecords",
- ShowAllInlineMedia: true,
- StatusesCount: 7579,
- TimeZone: "Eastern Time (US & Canada)",
- URL: nil,
- UtcOffset: -18000,
- Verified: false,
- },
- },
- Status{
- Contributors: nil,
- Coordinates: nil,
- CreatedAt: "Fri Sep 21 23:30:20 +0000 2012",
- Entities: Entities{
- Hashtags: []Hashtag{{
- Indices: []int{29, 43},
- Text: "freebandnames",
- }},
- Urls: []*string{},
- UserMentions: []*string{},
- },
- Favorited: false,
- Geo: nil,
- ID: 249289491129438208,
- IDStr: "249289491129438208",
- InReplyToScreenName: nil,
- InReplyToStatusID: nil,
- InReplyToStatusIDStr: nil,
- InReplyToUserID: nil,
- InReplyToUserIDStr: nil,
- Metadata: StatusMetadata{
- IsoLanguageCode: "en",
- ResultType: "recent",
- },
- Place: nil,
- RetweetCount: 0,
- Retweeted: false,
- Source: "web",
- Text: "Mexican Heaven, Mexican Hell #freebandnames",
- Truncated: false,
- User: User{
- ContributorsEnabled: false,
- CreatedAt: "Tue Sep 01 21:21:35 +0000 2009",
- DefaultProfile: false,
- DefaultProfileImage: false,
- Description: "Science Fiction Writer, sort of. Likes Superheroes, Mole People, Alt. Timelines.",
- Entities: UserEntities{
- Description: UserEntityDescription{
- Urls: nil,
- },
- URL: UserEntityURL{
- Urls: []URL{{
- ExpandedURL: nil,
- Indices: []int{0, 0},
- URL: "",
- }},
- },
- },
- FavouritesCount: 19,
- FollowRequestSent: nil,
- FollowersCount: 63,
- Following: nil,
- FriendsCount: 63,
- GeoEnabled: false,
- ID: 70789458,
- IDStr: "70789458",
- IsTranslator: false,
- Lang: "en",
- ListedCount: 1,
- Location: "Kingston New York",
- Name: "Thomas John Wakeman",
- Notifications: nil,
- ProfileBackgroundColor: "352726",
- ProfileBackgroundImageURL: "http://a0.twimg.com/images/themes/theme5/bg.gif",
- ProfileBackgroundImageURLHTTPS: "https://si0.twimg.com/images/themes/theme5/bg.gif",
- ProfileBackgroundTile: false,
- ProfileImageURL: "http://a0.twimg.com/profile_images/2219333930/Froggystyle_normal.png",
- ProfileImageURLHTTPS: "https://si0.twimg.com/profile_images/2219333930/Froggystyle_normal.png",
- ProfileLinkColor: "D02B55",
- ProfileSidebarBorderColor: "829D5E",
- ProfileSidebarFillColor: "99CC33",
- ProfileTextColor: "3E4415",
- ProfileUseBackgroundImage: true,
- Protected: false,
- ScreenName: "MonkiesFist",
- ShowAllInlineMedia: false,
- StatusesCount: 1048,
- TimeZone: "Eastern Time (US & Canada)",
- URL: nil,
- UtcOffset: -18000,
- Verified: false,
- },
- },
- Status{
- Contributors: nil,
- Coordinates: nil,
- CreatedAt: "Fri Sep 21 22:51:18 +0000 2012",
- Entities: Entities{
- Hashtags: []Hashtag{{
- Indices: []int{20, 34},
- Text: "freebandnames",
- }},
- Urls: []*string{},
- UserMentions: []*string{},
- },
- Favorited: false,
- Geo: nil,
- ID: 249279667666817024,
- IDStr: "249279667666817024",
- InReplyToScreenName: nil,
- InReplyToStatusID: nil,
- InReplyToStatusIDStr: nil,
- InReplyToUserID: nil,
- InReplyToUserIDStr: nil,
- Metadata: StatusMetadata{
- IsoLanguageCode: "en",
- ResultType: "recent",
- },
- Place: nil,
- RetweetCount: 0,
- Retweeted: false,
- Source: "<a href=\"//twitter.com/download/iphone%5C%22\" rel=\"\\\"nofollow\\\"\">Twitter for iPhone</a>",
- Text: "The Foolish Mortals #freebandnames",
- Truncated: false,
- User: User{
- ContributorsEnabled: false,
- CreatedAt: "Mon May 04 00:05:00 +0000 2009",
- DefaultProfile: false,
- DefaultProfileImage: false,
- Description: "Cartoonist, Illustrator, and T-Shirt connoisseur",
- Entities: UserEntities{
- Description: UserEntityDescription{
- Urls: []*string{},
- },
- URL: UserEntityURL{
- Urls: []URL{{
- ExpandedURL: nil,
- Indices: []int{0, 24},
- URL: "http://www.omnitarian.me",
- }},
- },
- },
- FavouritesCount: 647,
- FollowRequestSent: nil,
- FollowersCount: 608,
- Following: nil,
- FriendsCount: 249,
- GeoEnabled: false,
- ID: 37539828,
- IDStr: "37539828",
- IsTranslator: false,
- Lang: "en",
- ListedCount: 52,
- Location: "Wisconsin, USA",
- Name: "Marty Elmer",
- Notifications: nil,
- ProfileBackgroundColor: "EEE3C4",
- ProfileBackgroundImageURL: "http://a0.twimg.com/profile_background_images/106455659/rect6056-9.png",
- ProfileBackgroundImageURLHTTPS: "https://si0.twimg.com/profile_background_images/106455659/rect6056-9.png",
- ProfileBackgroundTile: true,
- ProfileImageURL: "http://a0.twimg.com/profile_images/1629790393/shrinker_2000_trans_normal.png",
- ProfileImageURLHTTPS: "https://si0.twimg.com/profile_images/1629790393/shrinker_2000_trans_normal.png",
- ProfileLinkColor: "3B2A26",
- ProfileSidebarBorderColor: "615A44",
- ProfileSidebarFillColor: "BFAC83",
- ProfileTextColor: "000000",
- ProfileUseBackgroundImage: true,
- Protected: false,
- ScreenName: "Omnitarian",
- ShowAllInlineMedia: true,
- StatusesCount: 3575,
- TimeZone: "Central Time (US & Canada)",
- URL: nil,
- UtcOffset: -21600,
- Verified: false,
- },
- },
- },
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/default_test.go b/vendor/github.com/mailru/easyjson/benchmark/default_test.go
deleted file mode 100644
index 68b37910d..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/default_test.go
+++ /dev/null
@@ -1,118 +0,0 @@
-// +build !use_easyjson,!use_ffjson,!use_codec,!use_jsoniter
-
-package benchmark
-
-import (
- "encoding/json"
- "testing"
-)
-
-func BenchmarkStd_Unmarshal_M(b *testing.B) {
- b.SetBytes(int64(len(largeStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- err := json.Unmarshal(largeStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkStd_Unmarshal_S(b *testing.B) {
- for i := 0; i < b.N; i++ {
- var s Entities
- err := json.Unmarshal(smallStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
- b.SetBytes(int64(len(smallStructText)))
-}
-
-func BenchmarkStd_Marshal_M(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := json.Marshal(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkStd_Marshal_L(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := json.Marshal(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkStd_Marshal_M_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := json.Marshal(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkStd_Marshal_L_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := json.Marshal(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkStd_Marshal_S(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := json.Marshal(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkStd_Marshal_S_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := json.Marshal(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkStd_Marshal_M_ToWriter(b *testing.B) {
- enc := json.NewEncoder(&DummyWriter{})
- for i := 0; i < b.N; i++ {
- err := enc.Encode(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/dummy_test.go b/vendor/github.com/mailru/easyjson/benchmark/dummy_test.go
deleted file mode 100644
index 3d928ca7c..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/dummy_test.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package benchmark
-
-import (
- "testing"
-)
-
-type DummyWriter struct{}
-
-func (w DummyWriter) Write(data []byte) (int, error) { return len(data), nil }
-
-func TestToSuppressNoTestsWarning(t *testing.T) {}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/easyjson_test.go b/vendor/github.com/mailru/easyjson/benchmark/easyjson_test.go
deleted file mode 100644
index 16b670b27..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/easyjson_test.go
+++ /dev/null
@@ -1,184 +0,0 @@
-// +build use_easyjson
-
-package benchmark
-
-import (
- "testing"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jwriter"
-)
-
-func BenchmarkEJ_Unmarshal_M(b *testing.B) {
- b.SetBytes(int64(len(largeStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- err := s.UnmarshalJSON(largeStructText)
- if err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkEJ_Unmarshal_S(b *testing.B) {
- b.SetBytes(int64(len(smallStructText)))
-
- for i := 0; i < b.N; i++ {
- var s Entities
- err := s.UnmarshalJSON(smallStructText)
- if err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkEJ_Marshal_M(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := easyjson.Marshal(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkEJ_Marshal_L(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := easyjson.Marshal(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkEJ_Marshal_L_ToWriter(b *testing.B) {
- var l int64
- out := &DummyWriter{}
- for i := 0; i < b.N; i++ {
- w := jwriter.Writer{}
- xlStructData.MarshalEasyJSON(&w)
- if w.Error != nil {
- b.Error(w.Error)
- }
-
- l = int64(w.Size())
- w.DumpTo(out)
- }
- b.SetBytes(l)
-
-}
-func BenchmarkEJ_Marshal_M_Parallel(b *testing.B) {
- b.SetBytes(int64(len(largeStructText)))
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- _, err := largeStructData.MarshalJSON()
- if err != nil {
- b.Error(err)
- }
- }
- })
-}
-
-func BenchmarkEJ_Marshal_M_ToWriter(b *testing.B) {
- var l int64
- out := &DummyWriter{}
- for i := 0; i < b.N; i++ {
- w := jwriter.Writer{}
- largeStructData.MarshalEasyJSON(&w)
- if w.Error != nil {
- b.Error(w.Error)
- }
-
- l = int64(w.Size())
- w.DumpTo(out)
- }
- b.SetBytes(l)
-
-}
-func BenchmarkEJ_Marshal_M_ToWriter_Parallel(b *testing.B) {
- out := &DummyWriter{}
-
- b.RunParallel(func(pb *testing.PB) {
- var l int64
- for pb.Next() {
- w := jwriter.Writer{}
- largeStructData.MarshalEasyJSON(&w)
- if w.Error != nil {
- b.Error(w.Error)
- }
-
- l = int64(w.Size())
- w.DumpTo(out)
- }
- if l > 0 {
- b.SetBytes(l)
- }
- })
-
-}
-
-func BenchmarkEJ_Marshal_L_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := xlStructData.MarshalJSON()
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkEJ_Marshal_L_ToWriter_Parallel(b *testing.B) {
- out := &DummyWriter{}
- b.RunParallel(func(pb *testing.PB) {
- var l int64
- for pb.Next() {
- w := jwriter.Writer{}
-
- xlStructData.MarshalEasyJSON(&w)
- if w.Error != nil {
- b.Error(w.Error)
- }
- l = int64(w.Size())
- w.DumpTo(out)
- }
- if l > 0 {
- b.SetBytes(l)
- }
- })
-}
-
-func BenchmarkEJ_Marshal_S(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := smallStructData.MarshalJSON()
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkEJ_Marshal_S_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := smallStructData.MarshalJSON()
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/example.json b/vendor/github.com/mailru/easyjson/benchmark/example.json
deleted file mode 100644
index 2405022cf..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/example.json
+++ /dev/null
@@ -1,415 +0,0 @@
-{
- "statuses": [
- {
- "coordinates": null,
- "favorited": false,
- "truncated": false,
- "created_at": "Mon Sep 24 03:35:21 +0000 2012",
- "id_str": "250075927172759552",
- "entities": {
- "urls": [
-
- ],
- "hashtags": [
- {
- "text": "freebandnames",
- "indices": [
- 20,
- 34
- ]
- }
- ],
- "user_mentions": [
-
- ]
- },
- "in_reply_to_user_id_str": null,
- "contributors": null,
- "text": "Aggressive Ponytail #freebandnames",
- "metadata": {
- "iso_language_code": "en",
- "result_type": "recent"
- },
- "retweet_count": 0,
- "in_reply_to_status_id_str": null,
- "id": 250075927172759552,
- "geo": null,
- "retweeted": false,
- "in_reply_to_user_id": null,
- "place": null,
- "user": {
- "profile_sidebar_fill_color": "DDEEF6",
- "profile_sidebar_border_color": "C0DEED",
- "profile_background_tile": false,
- "name": "Sean Cummings",
- "profile_image_url": "http://a0.twimg.com/profile_images/2359746665/1v6zfgqo8g0d3mk7ii5s_normal.jpeg",
- "created_at": "Mon Apr 26 06:01:55 +0000 2010",
- "location": "LA, CA",
- "follow_request_sent": null,
- "profile_link_color": "0084B4",
- "is_translator": false,
- "id_str": "137238150",
- "entities": {
- "url": {
- "urls": [
- {
- "expanded_url": null,
- "url": "",
- "indices": [
- 0,
- 0
- ]
- }
- ]
- },
- "description": {
- "urls": [
-
- ]
- }
- },
- "default_profile": true,
- "contributors_enabled": false,
- "favourites_count": 0,
- "url": null,
- "profile_image_url_https": "https://si0.twimg.com/profile_images/2359746665/1v6zfgqo8g0d3mk7ii5s_normal.jpeg",
- "utc_offset": -28800,
- "id": 137238150,
- "profile_use_background_image": true,
- "listed_count": 2,
- "profile_text_color": "333333",
- "lang": "en",
- "followers_count": 70,
- "protected": false,
- "notifications": null,
- "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme1/bg.png",
- "profile_background_color": "C0DEED",
- "verified": false,
- "geo_enabled": true,
- "time_zone": "Pacific Time (US & Canada)",
- "description": "Born 330 Live 310",
- "default_profile_image": false,
- "profile_background_image_url": "http://a0.twimg.com/images/themes/theme1/bg.png",
- "statuses_count": 579,
- "friends_count": 110,
- "following": null,
- "show_all_inline_media": false,
- "screen_name": "sean_cummings"
- },
- "in_reply_to_screen_name": null,
- "source": "<a href=\"//itunes.apple.com/us/app/twitter/id409789998?mt=12%5C%22\" rel=\"\\\"nofollow\\\"\">Twitter for Mac</a>",
- "in_reply_to_status_id": null
- },
- {
- "coordinates": null,
- "favorited": false,
- "truncated": false,
- "created_at": "Fri Sep 21 23:40:54 +0000 2012",
- "id_str": "249292149810667520",
- "entities": {
- "urls": [
-
- ],
- "hashtags": [
- {
- "text": "FreeBandNames",
- "indices": [
- 20,
- 34
- ]
- }
- ],
- "user_mentions": [
-
- ]
- },
- "in_reply_to_user_id_str": null,
- "contributors": null,
- "text": "Thee Namaste Nerdz. #FreeBandNames",
- "metadata": {
- "iso_language_code": "pl",
- "result_type": "recent"
- },
- "retweet_count": 0,
- "in_reply_to_status_id_str": null,
- "id": 249292149810667520,
- "geo": null,
- "retweeted": false,
- "in_reply_to_user_id": null,
- "place": null,
- "user": {
- "profile_sidebar_fill_color": "DDFFCC",
- "profile_sidebar_border_color": "BDDCAD",
- "profile_background_tile": true,
- "name": "Chaz Martenstein",
- "profile_image_url": "http://a0.twimg.com/profile_images/447958234/Lichtenstein_normal.jpg",
- "created_at": "Tue Apr 07 19:05:07 +0000 2009",
- "location": "Durham, NC",
- "follow_request_sent": null,
- "profile_link_color": "0084B4",
- "is_translator": false,
- "id_str": "29516238",
- "entities": {
- "url": {
- "urls": [
- {
- "expanded_url": null,
- "url": "http://bullcityrecords.com/wnng/",
- "indices": [
- 0,
- 32
- ]
- }
- ]
- },
- "description": {
- "urls": [
-
- ]
- }
- },
- "default_profile": false,
- "contributors_enabled": false,
- "favourites_count": 8,
- "url": "http://bullcityrecords.com/wnng/",
- "profile_image_url_https": "https://si0.twimg.com/profile_images/447958234/Lichtenstein_normal.jpg",
- "utc_offset": -18000,
- "id": 29516238,
- "profile_use_background_image": true,
- "listed_count": 118,
- "profile_text_color": "333333",
- "lang": "en",
- "followers_count": 2052,
- "protected": false,
- "notifications": null,
- "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/9423277/background_tile.bmp",
- "profile_background_color": "9AE4E8",
- "verified": false,
- "geo_enabled": false,
- "time_zone": "Eastern Time (US & Canada)",
- "description": "You will come to Durham, North Carolina. I will sell you some records then, here in Durham, North Carolina. Fun will happen.",
- "default_profile_image": false,
- "profile_background_image_url": "http://a0.twimg.com/profile_background_images/9423277/background_tile.bmp",
- "statuses_count": 7579,
- "friends_count": 348,
- "following": null,
- "show_all_inline_media": true,
- "screen_name": "bullcityrecords"
- },
- "in_reply_to_screen_name": null,
- "source": "web",
- "in_reply_to_status_id": null
- },
- {
- "coordinates": null,
- "favorited": false,
- "truncated": false,
- "created_at": "Fri Sep 21 23:30:20 +0000 2012",
- "id_str": "249289491129438208",
- "entities": {
- "urls": [
-
- ],
- "hashtags": [
- {
- "text": "freebandnames",
- "indices": [
- 29,
- 43
- ]
- }
- ],
- "user_mentions": [
-
- ]
- },
- "in_reply_to_user_id_str": null,
- "contributors": null,
- "text": "Mexican Heaven, Mexican Hell #freebandnames",
- "metadata": {
- "iso_language_code": "en",
- "result_type": "recent"
- },
- "retweet_count": 0,
- "in_reply_to_status_id_str": null,
- "id": 249289491129438208,
- "geo": null,
- "retweeted": false,
- "in_reply_to_user_id": null,
- "place": null,
- "user": {
- "profile_sidebar_fill_color": "99CC33",
- "profile_sidebar_border_color": "829D5E",
- "profile_background_tile": false,
- "name": "Thomas John Wakeman",
- "profile_image_url": "http://a0.twimg.com/profile_images/2219333930/Froggystyle_normal.png",
- "created_at": "Tue Sep 01 21:21:35 +0000 2009",
- "location": "Kingston New York",
- "follow_request_sent": null,
- "profile_link_color": "D02B55",
- "is_translator": false,
- "id_str": "70789458",
- "entities": {
- "url": {
- "urls": [
- {
- "expanded_url": null,
- "url": "",
- "indices": [
- 0,
- 0
- ]
- }
- ]
- },
- "description": {
- "urls": [
-
- ]
- }
- },
- "default_profile": false,
- "contributors_enabled": false,
- "favourites_count": 19,
- "url": null,
- "profile_image_url_https": "https://si0.twimg.com/profile_images/2219333930/Froggystyle_normal.png",
- "utc_offset": -18000,
- "id": 70789458,
- "profile_use_background_image": true,
- "listed_count": 1,
- "profile_text_color": "3E4415",
- "lang": "en",
- "followers_count": 63,
- "protected": false,
- "notifications": null,
- "profile_background_image_url_https": "https://si0.twimg.com/images/themes/theme5/bg.gif",
- "profile_background_color": "352726",
- "verified": false,
- "geo_enabled": false,
- "time_zone": "Eastern Time (US & Canada)",
- "description": "Science Fiction Writer, sort of. Likes Superheroes, Mole People, Alt. Timelines.",
- "default_profile_image": false,
- "profile_background_image_url": "http://a0.twimg.com/images/themes/theme5/bg.gif",
- "statuses_count": 1048,
- "friends_count": 63,
- "following": null,
- "show_all_inline_media": false,
- "screen_name": "MonkiesFist"
- },
- "in_reply_to_screen_name": null,
- "source": "web",
- "in_reply_to_status_id": null
- },
- {
- "coordinates": null,
- "favorited": false,
- "truncated": false,
- "created_at": "Fri Sep 21 22:51:18 +0000 2012",
- "id_str": "249279667666817024",
- "entities": {
- "urls": [
-
- ],
- "hashtags": [
- {
- "text": "freebandnames",
- "indices": [
- 20,
- 34
- ]
- }
- ],
- "user_mentions": [
-
- ]
- },
- "in_reply_to_user_id_str": null,
- "contributors": null,
- "text": "The Foolish Mortals #freebandnames",
- "metadata": {
- "iso_language_code": "en",
- "result_type": "recent"
- },
- "retweet_count": 0,
- "in_reply_to_status_id_str": null,
- "id": 249279667666817024,
- "geo": null,
- "retweeted": false,
- "in_reply_to_user_id": null,
- "place": null,
- "user": {
- "profile_sidebar_fill_color": "BFAC83",
- "profile_sidebar_border_color": "615A44",
- "profile_background_tile": true,
- "name": "Marty Elmer",
- "profile_image_url": "http://a0.twimg.com/profile_images/1629790393/shrinker_2000_trans_normal.png",
- "created_at": "Mon May 04 00:05:00 +0000 2009",
- "location": "Wisconsin, USA",
- "follow_request_sent": null,
- "profile_link_color": "3B2A26",
- "is_translator": false,
- "id_str": "37539828",
- "entities": {
- "url": {
- "urls": [
- {
- "expanded_url": null,
- "url": "http://www.omnitarian.me",
- "indices": [
- 0,
- 24
- ]
- }
- ]
- },
- "description": {
- "urls": [
-
- ]
- }
- },
- "default_profile": false,
- "contributors_enabled": false,
- "favourites_count": 647,
- "url": "http://www.omnitarian.me",
- "profile_image_url_https": "https://si0.twimg.com/profile_images/1629790393/shrinker_2000_trans_normal.png",
- "utc_offset": -21600,
- "id": 37539828,
- "profile_use_background_image": true,
- "listed_count": 52,
- "profile_text_color": "000000",
- "lang": "en",
- "followers_count": 608,
- "protected": false,
- "notifications": null,
- "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/106455659/rect6056-9.png",
- "profile_background_color": "EEE3C4",
- "verified": false,
- "geo_enabled": false,
- "time_zone": "Central Time (US & Canada)",
- "description": "Cartoonist, Illustrator, and T-Shirt connoisseur",
- "default_profile_image": false,
- "profile_background_image_url": "http://a0.twimg.com/profile_background_images/106455659/rect6056-9.png",
- "statuses_count": 3575,
- "friends_count": 249,
- "following": null,
- "show_all_inline_media": true,
- "screen_name": "Omnitarian"
- },
- "in_reply_to_screen_name": null,
- "source": "<a href=\"//twitter.com/download/iphone%5C%22\" rel=\"\\\"nofollow\\\"\">Twitter for iPhone</a>",
- "in_reply_to_status_id": null
- }
- ],
- "search_metadata": {
- "max_id": 250126199840518145,
- "since_id": 24012619984051000,
- "refresh_url": "?since_id=250126199840518145&q=%23freebandnames&result_type=mixed&include_entities=1",
- "next_results": "?max_id=249279667666817023&q=%23freebandnames&count=4&include_entities=1&result_type=mixed",
- "count": 4,
- "completed_in": 0.035,
- "since_id_str": "24012619984051000",
- "query": "%23freebandnames",
- "max_id_str": "250126199840518145"
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/ffjson_test.go b/vendor/github.com/mailru/easyjson/benchmark/ffjson_test.go
deleted file mode 100644
index 03671827c..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/ffjson_test.go
+++ /dev/null
@@ -1,190 +0,0 @@
-// +build use_ffjson
-
-package benchmark
-
-import (
- "testing"
-
- "github.com/pquerna/ffjson/ffjson"
-)
-
-func BenchmarkFF_Unmarshal_M(b *testing.B) {
- b.SetBytes(int64(len(largeStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- err := ffjson.UnmarshalFast(largeStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkFF_Unmarshal_S(b *testing.B) {
- for i := 0; i < b.N; i++ {
- var s Entities
- err := ffjson.UnmarshalFast(smallStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
- b.SetBytes(int64(len(smallStructText)))
-}
-
-func BenchmarkFF_Marshal_M(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_S(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_M_Pool(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- ffjson.Pool(data)
- }
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_L(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_L_Pool(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- ffjson.Pool(data)
- }
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_L_Pool_Parallel(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- ffjson.Pool(data)
- }
- b.SetBytes(l)
-}
-func BenchmarkFF_Marshal_M_Pool_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := ffjson.MarshalFast(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- ffjson.Pool(data)
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_S_Pool(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := ffjson.MarshalFast(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- ffjson.Pool(data)
- }
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_S_Pool_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := ffjson.MarshalFast(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- ffjson.Pool(data)
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_S_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := ffjson.MarshalFast(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_M_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := ffjson.MarshalFast(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkFF_Marshal_L_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := ffjson.MarshalFast(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/jsoniter_test.go b/vendor/github.com/mailru/easyjson/benchmark/jsoniter_test.go
deleted file mode 100644
index 004f891da..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/jsoniter_test.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// +build use_jsoniter
-
-package benchmark
-
-import (
- "testing"
-
- jsoniter "github.com/json-iterator/go"
-)
-
-func BenchmarkJI_Unmarshal_M(b *testing.B) {
- b.SetBytes(int64(len(largeStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- err := jsoniter.Unmarshal(largeStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkJI_Unmarshal_S(b *testing.B) {
- for i := 0; i < b.N; i++ {
- var s Entities
- err := jsoniter.Unmarshal(smallStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
- b.SetBytes(int64(len(smallStructText)))
-}
-
-func BenchmarkJI_Marshal_M(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := jsoniter.Marshal(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_L(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := jsoniter.Marshal(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_M_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := jsoniter.Marshal(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_L_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := jsoniter.Marshal(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_S(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := jsoniter.Marshal(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_S_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := jsoniter.Marshal(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_M_ToWriter(b *testing.B) {
- enc := jsoniter.NewEncoder(&DummyWriter{})
- for i := 0; i < b.N; i++ {
- err := enc.Encode(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/benchmark/ujson.sh b/vendor/github.com/mailru/easyjson/benchmark/ujson.sh
deleted file mode 100755
index 378e7df46..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/ujson.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#/bin/bash
-
-echo -n "Python ujson module, DECODE: "
-python -m timeit -s "import ujson; data = open('`dirname $0`/example.json', 'r').read()" 'ujson.loads(data)'
-
-echo -n "Python ujson module, ENCODE: "
-python -m timeit -s "import ujson; data = open('`dirname $0`/example.json', 'r').read(); obj = ujson.loads(data)" 'ujson.dumps(obj)'