// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. package ppfl_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 easyjson3929c57eDecodePpflJson(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()) default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjson3929c57eEncodePpflJson(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)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v ImagesItem) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjson3929c57eEncodePpflJson(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ImagesItem) MarshalEasyJSON(w *jwriter.Writer) { easyjson3929c57eEncodePpflJson(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ImagesItem) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson3929c57eDecodePpflJson(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ImagesItem) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson3929c57eDecodePpflJson(l, v) } func easyjson3929c57eDecodePpflJson1(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 easyjson3929c57eEncodePpflJson1(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{} easyjson3929c57eEncodePpflJson1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Images) MarshalEasyJSON(w *jwriter.Writer) { easyjson3929c57eEncodePpflJson1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Images) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson3929c57eDecodePpflJson1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Images) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson3929c57eDecodePpflJson1(l, v) } func easyjson3929c57eDecodePpflJson2(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 "HitRateType": out.HitRateType = int(in.Int()) case "FreeTimeType": out.FreeTimeType = int(in.Int()) case "NewTypeNum": out.NewTypeNum = int(in.Int()) case "AxleIndex": out.AxleIndex = int(in.Int()) default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjson3929c57eEncodePpflJson2(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 = ",\"HitRateType\":" out.RawString(prefix) out.Int(int(in.HitRateType)) } { const prefix string = ",\"FreeTimeType\":" out.RawString(prefix) out.Int(int(in.FreeTimeType)) } { const prefix string = ",\"NewTypeNum\":" out.RawString(prefix) out.Int(int(in.NewTypeNum)) } { const prefix string = ",\"AxleIndex\":" out.RawString(prefix) out.Int(int(in.AxleIndex)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v CustomData) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjson3929c57eEncodePpflJson2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CustomData) MarshalEasyJSON(w *jwriter.Writer) { easyjson3929c57eEncodePpflJson2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CustomData) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson3929c57eDecodePpflJson2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CustomData) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson3929c57eDecodePpflJson2(l, v) }