// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. package dg5_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 easyjsonC679b7c6DecodeDg5Json(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 "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 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.WinCards = append(out.WinCards, v3) 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()) default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC679b7c6EncodeDg5Json(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 v5, v6 := range in.Cards { if v5 > 0 { out.RawByte(',') } if v6 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') for v7, v8 := range v6 { if v7 > 0 { out.RawByte(',') } out.Int(int(v8)) } 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 v9, v10 := range in.WinCards { if v9 > 0 { out.RawByte(',') } if v10 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') for v11, v12 := range v10 { if v11 > 0 { out.RawByte(',') } out.Int(int(v12)) } 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)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v ImagesItem) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC679b7c6EncodeDg5Json(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ImagesItem) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC679b7c6EncodeDg5Json(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ImagesItem) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC679b7c6DecodeDg5Json(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ImagesItem) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC679b7c6DecodeDg5Json(l, v) } func easyjsonC679b7c6DecodeDg5Json1(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 v13 *ImagesItem if in.IsNull() { in.Skip() v13 = nil } else { if v13 == nil { v13 = new(ImagesItem) } (*v13).UnmarshalEasyJSON(in) } out.Si = append(out.Si, v13) in.WantComma() } in.Delim(']') } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC679b7c6EncodeDg5Json1(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 v14, v15 := range in.Si { if v14 > 0 { out.RawByte(',') } if v15 == nil { out.RawString("null") } else { (*v15).MarshalEasyJSON(out) } } out.RawByte(']') } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v Images) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC679b7c6EncodeDg5Json1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Images) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC679b7c6EncodeDg5Json1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Images) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC679b7c6DecodeDg5Json1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Images) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC679b7c6DecodeDg5Json1(l, v) } func easyjsonC679b7c6DecodeDg5Json2(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 "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 v16 *ImagesItem if in.IsNull() { in.Skip() v16 = nil } else { if v16 == nil { v16 = new(ImagesItem) } (*v16).UnmarshalEasyJSON(in) } out.SpinImage = append(out.SpinImage, v16) in.WantComma() } in.Delim(']') } case "scatterNum": out.ScatterNum = int(in.Int()) case "totalWin": out.TotalWin = float64(in.Float64()) case "Idx": out.Idx = int(in.Int()) default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC679b7c6EncodeDg5Json2(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 = ",\"spinImage\":" out.RawString(prefix) if in.SpinImage == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') for v17, v18 := range in.SpinImage { if v17 > 0 { out.RawByte(',') } if v18 == nil { out.RawString("null") } else { (*v18).MarshalEasyJSON(out) } } out.RawByte(']') } } { const prefix string = ",\"scatterNum\":" out.RawString(prefix) out.Int(int(in.ScatterNum)) } { const prefix string = ",\"totalWin\":" out.RawString(prefix) out.Float64(float64(in.TotalWin)) } { 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{} easyjsonC679b7c6EncodeDg5Json2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CustomData) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC679b7c6EncodeDg5Json2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CustomData) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC679b7c6DecodeDg5Json2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CustomData) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC679b7c6DecodeDg5Json2(l, v) } func easyjsonC679b7c6DecodeDg5Json3(in *jlexer.Lexer, out *CardPos) { 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 "L": out.L = int(in.Int()) case "H": out.H = int(in.Int()) default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC679b7c6EncodeDg5Json3(out *jwriter.Writer, in CardPos) { out.RawByte('{') first := true _ = first { const prefix string = ",\"L\":" out.RawString(prefix[1:]) out.Int(int(in.L)) } { const prefix string = ",\"H\":" out.RawString(prefix) out.Int(int(in.H)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v CardPos) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC679b7c6EncodeDg5Json3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CardPos) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC679b7c6EncodeDg5Json3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CardPos) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC679b7c6DecodeDg5Json3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CardPos) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC679b7c6DecodeDg5Json3(l, v) }