123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
- package webmail
- 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 easyjsonD3b49167DecodeGitlabIzeneComGonglaoWebmail(in *jlexer.Lexer, out *ResultList) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- in.Skip()
- *out = nil
- } else {
- in.Delim('[')
- if *out == nil {
- if !in.IsDelim(']') {
- *out = make(ResultList, 0, 4)
- } else {
- *out = ResultList{}
- }
- } else {
- *out = (*out)[:0]
- }
- for !in.IsDelim(']') {
- var v1 string
- v1 = string(in.String())
- *out = append(*out, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonD3b49167EncodeGitlabIzeneComGonglaoWebmail(out *jwriter.Writer, in ResultList) {
- if in == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in {
- if v2 > 0 {
- out.RawByte(',')
- }
- out.String(string(v3))
- }
- out.RawByte(']')
- }
- }
- // MarshalJSON supports json.Marshaler interface
- func (v ResultList) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonD3b49167EncodeGitlabIzeneComGonglaoWebmail(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v ResultList) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonD3b49167EncodeGitlabIzeneComGonglaoWebmail(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *ResultList) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonD3b49167DecodeGitlabIzeneComGonglaoWebmail(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *ResultList) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonD3b49167DecodeGitlabIzeneComGonglaoWebmail(l, v)
- }
- func easyjsonD3b49167DecodeGitlabIzeneComGonglaoWebmail1(in *jlexer.Lexer, out *Result) {
- 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 "result":
- out.Ok = string(in.String())
- case "errno":
- out.Error = in.JsonNumber()
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonD3b49167EncodeGitlabIzeneComGonglaoWebmail1(out *jwriter.Writer, in Result) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"result\":"
- out.RawString(prefix[1:])
- out.String(string(in.Ok))
- }
- {
- const prefix string = ",\"errno\":"
- out.RawString(prefix)
- out.String(string(in.Error))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v Result) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonD3b49167EncodeGitlabIzeneComGonglaoWebmail1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v Result) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonD3b49167EncodeGitlabIzeneComGonglaoWebmail1(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *Result) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonD3b49167DecodeGitlabIzeneComGonglaoWebmail1(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *Result) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonD3b49167DecodeGitlabIzeneComGonglaoWebmail1(l, v)
- }
|