// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. package hp88_json import ( json "encoding/json" easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" ) // suppress unused package warning var ( _ *json.RawMessage _ *jlexer.Lexer _ *jwriter.Writer _ easyjson.Marshaler ) func easyjsonC0632750DecodeHp88Json(in *jlexer.Lexer, out *ImagesItem) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "cards": if in.IsNull() { in.Skip() out.Cards = nil } else { in.Delim('[') if out.Cards == nil { if !in.IsDelim(']') { out.Cards = make([][]int, 0, 2) } else { out.Cards = [][]int{} } } else { out.Cards = (out.Cards)[:0] } for !in.IsDelim(']') { var v1 []int if in.IsNull() { in.Skip() v1 = nil } else { in.Delim('[') if v1 == nil { if !in.IsDelim(']') { v1 = make([]int, 0, 8) } else { v1 = []int{} } } else { v1 = (v1)[:0] } for !in.IsDelim(']') { var v2 int v2 = int(in.Int()) v1 = append(v1, v2) in.WantComma() } in.Delim(']') } out.Cards = append(out.Cards, v1) in.WantComma() } in.Delim(']') } case "coronas": if in.IsNull() { in.Skip() out.Coronas = nil } else { in.Delim('[') if out.Coronas == nil { if !in.IsDelim(']') { out.Coronas = make([][]int, 0, 2) } else { out.Coronas = [][]int{} } } else { out.Coronas = (out.Coronas)[:0] } for !in.IsDelim(']') { var v3 []int if in.IsNull() { in.Skip() v3 = nil } else { in.Delim('[') if v3 == nil { if !in.IsDelim(']') { v3 = make([]int, 0, 8) } else { v3 = []int{} } } else { v3 = (v3)[:0] } for !in.IsDelim(']') { var v4 int v4 = int(in.Int()) v3 = append(v3, v4) in.WantComma() } in.Delim(']') } out.Coronas = append(out.Coronas, v3) in.WantComma() } in.Delim(']') } case "winGold": out.WinGold = float64(in.Float64()) case "tumbleWinGold": out.TumbleWinGold = float64(in.Float64()) case "freeGold": out.FreeGold = float64(in.Float64()) case "freeSpins": out.FreeSpins = int(in.Int()) case "gainedFreeSpins": out.GainedFreeSpins = int(in.Int()) case "wonFreeSpins": out.WonFreeSpins = bool(in.Bool()) case "winCards": if in.IsNull() { in.Skip() out.WinCards = nil } else { in.Delim('[') if out.WinCards == nil { if !in.IsDelim(']') { out.WinCards = make([][][]int, 0, 2) } else { out.WinCards = [][][]int{} } } else { out.WinCards = (out.WinCards)[:0] } for !in.IsDelim(']') { var v5 [][]int if in.IsNull() { in.Skip() v5 = nil } else { in.Delim('[') if v5 == nil { if !in.IsDelim(']') { v5 = make([][]int, 0, 2) } else { v5 = [][]int{} } } else { v5 = (v5)[:0] } for !in.IsDelim(']') { var v6 []int if in.IsNull() { in.Skip() v6 = nil } else { in.Delim('[') if v6 == nil { if !in.IsDelim(']') { v6 = make([]int, 0, 8) } else { v6 = []int{} } } else { v6 = (v6)[:0] } for !in.IsDelim(']') { var v7 int v7 = int(in.Int()) v6 = append(v6, v7) in.WantComma() } in.Delim(']') } v5 = append(v5, v6) in.WantComma() } in.Delim(']') } out.WinCards = append(out.WinCards, v5) in.WantComma() } in.Delim(']') } case "mul": out.Mul = int(in.Int()) case "finalMul": out.FinalMul = int(in.Int()) case "totalWinGold": out.TotalWinGold = float64(in.Float64()) case "isScatter": out.IsScatter = bool(in.Bool()) case "isFree": out.IsFree = bool(in.Bool()) case "isFu": out.IsFu = bool(in.Bool()) case "coronaNum": out.CoronaNum = int(in.Int()) case "normalWin": out.NormalWin = float64(in.Float64()) default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC0632750EncodeHp88Json(out *jwriter.Writer, in ImagesItem) { out.RawByte('{') first := true _ = first { const prefix string = ",\"cards\":" out.RawString(prefix[1:]) if in.Cards == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') for v8, v9 := range in.Cards { if v8 > 0 { out.RawByte(',') } if v9 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') for v10, v11 := range v9 { if v10 > 0 { out.RawByte(',') } out.Int(int(v11)) } out.RawByte(']') } } out.RawByte(']') } } { const prefix string = ",\"coronas\":" out.RawString(prefix) if in.Coronas == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') for v12, v13 := range in.Coronas { if v12 > 0 { out.RawByte(',') } if v13 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') for v14, v15 := range v13 { if v14 > 0 { out.RawByte(',') } out.Int(int(v15)) } out.RawByte(']') } } out.RawByte(']') } } { const prefix string = ",\"winGold\":" out.RawString(prefix) out.Float64(float64(in.WinGold)) } { const prefix string = ",\"tumbleWinGold\":" out.RawString(prefix) out.Float64(float64(in.TumbleWinGold)) } { const prefix string = ",\"freeGold\":" out.RawString(prefix) out.Float64(float64(in.FreeGold)) } { const prefix string = ",\"freeSpins\":" out.RawString(prefix) out.Int(int(in.FreeSpins)) } { const prefix string = ",\"gainedFreeSpins\":" out.RawString(prefix) out.Int(int(in.GainedFreeSpins)) } { const prefix string = ",\"wonFreeSpins\":" out.RawString(prefix) out.Bool(bool(in.WonFreeSpins)) } { const prefix string = ",\"winCards\":" out.RawString(prefix) if in.WinCards == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') for v16, v17 := range in.WinCards { if v16 > 0 { out.RawByte(',') } if v17 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') for v18, v19 := range v17 { if v18 > 0 { out.RawByte(',') } if v19 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') for v20, v21 := range v19 { if v20 > 0 { out.RawByte(',') } out.Int(int(v21)) } out.RawByte(']') } } out.RawByte(']') } } out.RawByte(']') } } { const prefix string = ",\"mul\":" out.RawString(prefix) out.Int(int(in.Mul)) } { const prefix string = ",\"finalMul\":" out.RawString(prefix) out.Int(int(in.FinalMul)) } { const prefix string = ",\"totalWinGold\":" out.RawString(prefix) out.Float64(float64(in.TotalWinGold)) } { const prefix string = ",\"isScatter\":" out.RawString(prefix) out.Bool(bool(in.IsScatter)) } { const prefix string = ",\"isFree\":" out.RawString(prefix) out.Bool(bool(in.IsFree)) } { const prefix string = ",\"isFu\":" out.RawString(prefix) out.Bool(bool(in.IsFu)) } { const prefix string = ",\"coronaNum\":" out.RawString(prefix) out.Int(int(in.CoronaNum)) } { const prefix string = ",\"normalWin\":" out.RawString(prefix) out.Float64(float64(in.NormalWin)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v ImagesItem) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC0632750EncodeHp88Json(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ImagesItem) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC0632750EncodeHp88Json(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ImagesItem) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC0632750DecodeHp88Json(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ImagesItem) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC0632750DecodeHp88Json(l, v) } func easyjsonC0632750DecodeHp88Json1(in *jlexer.Lexer, out *Images) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "si": if in.IsNull() { in.Skip() out.Si = nil } else { in.Delim('[') if out.Si == nil { if !in.IsDelim(']') { out.Si = make([]*ImagesItem, 0, 8) } else { out.Si = []*ImagesItem{} } } else { out.Si = (out.Si)[:0] } for !in.IsDelim(']') { var v22 *ImagesItem if in.IsNull() { in.Skip() v22 = nil } else { if v22 == nil { v22 = new(ImagesItem) } (*v22).UnmarshalEasyJSON(in) } out.Si = append(out.Si, v22) in.WantComma() } in.Delim(']') } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC0632750EncodeHp88Json1(out *jwriter.Writer, in Images) { out.RawByte('{') first := true _ = first { const prefix string = ",\"si\":" out.RawString(prefix[1:]) if in.Si == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') for v23, v24 := range in.Si { if v23 > 0 { out.RawByte(',') } if v24 == nil { out.RawString("null") } else { (*v24).MarshalEasyJSON(out) } } out.RawByte(']') } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v Images) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC0632750EncodeHp88Json1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Images) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC0632750EncodeHp88Json1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Images) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC0632750DecodeHp88Json1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Images) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC0632750DecodeHp88Json1(l, v) } func easyjsonC0632750DecodeHp88Json2(in *jlexer.Lexer, out *CustomData) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "tw": out.Tw = float64(in.Float64()) case "sstw": out.Sstw = float64(in.Float64()) case "fsci": out.Fsci = int(in.Int()) case "fsmi": out.Fsmi = int(in.Int()) case "freeTotal": out.FreeTotal = int(in.Int()) case "totalWin": out.TotalWin = float64(in.Float64()) case "spinImage": if in.IsNull() { in.Skip() out.SpinImage = nil } else { in.Delim('[') if out.SpinImage == nil { if !in.IsDelim(']') { out.SpinImage = make([]*ImagesItem, 0, 8) } else { out.SpinImage = []*ImagesItem{} } } else { out.SpinImage = (out.SpinImage)[:0] } for !in.IsDelim(']') { var v25 *ImagesItem if in.IsNull() { in.Skip() v25 = nil } else { if v25 == nil { v25 = new(ImagesItem) } (*v25).UnmarshalEasyJSON(in) } out.SpinImage = append(out.SpinImage, v25) in.WantComma() } in.Delim(']') } case "idx": out.Idx = int(in.Int()) default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC0632750EncodeHp88Json2(out *jwriter.Writer, in CustomData) { out.RawByte('{') first := true _ = first { const prefix string = ",\"tw\":" out.RawString(prefix[1:]) out.Float64(float64(in.Tw)) } { const prefix string = ",\"sstw\":" out.RawString(prefix) out.Float64(float64(in.Sstw)) } { const prefix string = ",\"fsci\":" out.RawString(prefix) out.Int(int(in.Fsci)) } { const prefix string = ",\"fsmi\":" out.RawString(prefix) out.Int(int(in.Fsmi)) } { const prefix string = ",\"freeTotal\":" out.RawString(prefix) out.Int(int(in.FreeTotal)) } { const prefix string = ",\"totalWin\":" out.RawString(prefix) out.Float64(float64(in.TotalWin)) } { const prefix string = ",\"spinImage\":" out.RawString(prefix) if in.SpinImage == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') for v26, v27 := range in.SpinImage { if v26 > 0 { out.RawByte(',') } if v27 == nil { out.RawString("null") } else { (*v27).MarshalEasyJSON(out) } } out.RawByte(']') } } { const prefix string = ",\"idx\":" out.RawString(prefix) out.Int(int(in.Idx)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v CustomData) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC0632750EncodeHp88Json2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CustomData) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC0632750EncodeHp88Json2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CustomData) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC0632750DecodeHp88Json2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CustomData) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC0632750DecodeHp88Json2(l, v) }