Example #1
0
func easyjson_decode_finance_provider_yahoo_YahooRate(in *jlexer.Lexer, out *YahooRate) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.Id = in.String()
		case "Name":
			out.Name = in.String()
		case "Rate":
			out.Rate = in.String()
		case "Date":
			out.Date = in.String()
		case "Time":
			out.Time = in.String()
		case "Ask":
			out.Ask = in.String()
		case "Bid":
			out.Bid = in.String()
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
Example #2
0
func easyjson_decode_finance_provider_yahoo_Result(in *jlexer.Lexer, out *Result) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "count":
			out.Count = in.Int()
		case "created":
			out.Created = in.String()
		case "lang":
			out.Lang = in.String()
		case "results":
			(out.Results).UnmarshalEasyJSON(in)
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
func easyjson_decode_go_serialization_benchmarks_A(in *jlexer.Lexer, out *A) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "Name":
			out.Name = in.String()
		case "BirthDay":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.BirthDay).UnmarshalJSON(data))
			}
		case "Phone":
			out.Phone = in.String()
		case "Siblings":
			out.Siblings = in.Int()
		case "Spouse":
			out.Spouse = in.Bool()
		case "Money":
			out.Money = in.Float64()
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
Example #4
0
// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Optional) UnmarshalEasyJSON(l *jlexer.Lexer) {
	if l.IsNull() {
		l.Skip()
		*v = Optional{}
	} else {
		v.V = l.Optional()
		v.Defined = true
	}
}
Example #5
0
// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *String) UnmarshalEasyJSON(l *jlexer.Lexer) {
	if l.IsNull() {
		l.Skip()
		*v = String{}
	} else {
		v.V = l.String()
		v.Defined = true
	}
}
Example #6
0
// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Bool) UnmarshalEasyJSON(l *jlexer.Lexer) {
	if l.IsNull() {
		l.Skip()
		*v = Bool{}
	} else {
		v.V = l.Bool()
		v.Defined = true
	}
}
Example #7
0
// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Uint) UnmarshalEasyJSON(l *jlexer.Lexer) {
	if l.IsNull() {
		l.Skip()
		*v = Uint{}
	} else {
		v.V = l.Uint()
		v.Defined = true
	}
}
Example #8
0
// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Int16) UnmarshalEasyJSON(l *jlexer.Lexer) {
	if l.IsNull() {
		l.Skip()
		*v = Int16{}
	} else {
		v.V = l.Int16()
		v.Defined = true
	}
}
Example #9
0
// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Float64) UnmarshalEasyJSON(l *jlexer.Lexer) {
	if l.IsNull() {
		l.Skip()
		*v = Float64{}
	} else {
		v.V = l.Float64()
		v.Defined = true
	}
}
Example #10
0
func easyjson_decode_github_com_buger_jsonparser_benchmark_MediumPayload(in *jlexer.Lexer, out *MediumPayload) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "person":
			if in.IsNull() {
				in.Skip()
				out.Person = nil
			} else {
				out.Person = new(CBPerson)
				(*out.Person).UnmarshalEasyJSON(in)
			}
		case "company":
			in.Delim('{')
			if !in.IsDelim('}') {
				out.Company = make(map[string]interface{})
			} else {
				out.Company = nil
			}
			for !in.IsDelim('}') {
				key := in.String()
				in.WantColon()
				var v7 interface{}
				v7 = in.Interface()
				(out.Company)[key] = v7
				in.WantComma()
			}
			in.Delim('}')
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
Example #11
0
func easyjson_decode_github_com_buger_jsonparser_benchmark_CBAvatar(in *jlexer.Lexer, out *CBAvatar) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "url":
			out.Url = in.String()
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
Example #12
0
func easyjson_decode_finance_provider_yahoo_Response(in *jlexer.Lexer, out *Response) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "query":
			(out.Query).UnmarshalEasyJSON(in)
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
Example #13
0
func easyjson_decode_github_com_buger_jsonparser_benchmark_DSTopicsList(in *jlexer.Lexer, out *DSTopicsList) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "topics":
			in.Delim('[')
			if !in.IsDelim(']') {
				out.Topics = make([]*DSTopic, 0, 8)
			} else {
				out.Topics = nil
			}
			for !in.IsDelim(']') {
				var v4 *DSTopic
				if in.IsNull() {
					in.Skip()
					v4 = nil
				} else {
					v4 = new(DSTopic)
					(*v4).UnmarshalEasyJSON(in)
				}
				out.Topics = append(out.Topics, v4)
				in.WantComma()
			}
			in.Delim(']')
		case "more_topics_url":
			out.MoreTopicsUrl = in.String()
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
Example #14
0
func easyjson_decode_github_com_dimiro1_experiments_easyjson_Person(in *jlexer.Lexer, out *Person) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "name":
			out.Name = in.String()
		case "age":
			out.Age = in.Int()
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
Example #15
0
func easyjson_decode_github_com_buger_jsonparser_benchmark_DSTopic(in *jlexer.Lexer, out *DSTopic) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.Id = in.Int()
		case "slug":
			out.Slug = in.String()
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
Example #16
0
func easyjson_decode_github_com_buger_jsonparser_benchmark_CBGravatar(in *jlexer.Lexer, out *CBGravatar) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "avatars":
			in.Delim('[')
			if !in.IsDelim(']') {
				out.Avatars = make([]*CBAvatar, 0, 8)
			} else {
				out.Avatars = nil
			}
			for !in.IsDelim(']') {
				var v9 *CBAvatar
				if in.IsNull() {
					in.Skip()
					v9 = nil
				} else {
					v9 = new(CBAvatar)
					(*v9).UnmarshalEasyJSON(in)
				}
				out.Avatars = append(out.Avatars, v9)
				in.WantComma()
			}
			in.Delim(']')
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
Example #17
0
func easyjson_decode_github_com_buger_jsonparser_benchmark_SmallPayload(in *jlexer.Lexer, out *SmallPayload) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "st":
			out.St = in.Int()
		case "sid":
			out.Sid = in.Int()
		case "tt":
			out.Tt = in.String()
		case "gr":
			out.Gr = in.Int()
		case "uuid":
			out.Uuid = in.String()
		case "ip":
			out.Ip = in.String()
		case "ua":
			out.Ua = in.String()
		case "tz":
			out.Tz = in.Int()
		case "v":
			out.V = in.Int()
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
Example #18
0
func easyjson_decode_github_com_buger_jsonparser_benchmark_CBPerson(in *jlexer.Lexer, out *CBPerson) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "name":
			if in.IsNull() {
				in.Skip()
				out.Name = nil
			} else {
				out.Name = new(CBName)
				(*out.Name).UnmarshalEasyJSON(in)
			}
		case "github":
			if in.IsNull() {
				in.Skip()
				out.Github = nil
			} else {
				out.Github = new(CBGithub)
				(*out.Github).UnmarshalEasyJSON(in)
			}
		case "gravatar":
			if in.IsNull() {
				in.Skip()
				out.Gravatar = nil
			} else {
				out.Gravatar = new(CBGravatar)
				(*out.Gravatar).UnmarshalEasyJSON(in)
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
Example #19
0
func easyjson_decode_github_com_buger_jsonparser_benchmark_LargePayload(in *jlexer.Lexer, out *LargePayload) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "users":
			in.Delim('[')
			if !in.IsDelim(']') {
				out.Users = make([]*DSUser, 0, 8)
			} else {
				out.Users = nil
			}
			for !in.IsDelim(']') {
				var v1 *DSUser
				if in.IsNull() {
					in.Skip()
					v1 = nil
				} else {
					v1 = new(DSUser)
					(*v1).UnmarshalEasyJSON(in)
				}
				out.Users = append(out.Users, v1)
				in.WantComma()
			}
			in.Delim(']')
		case "topics":
			if in.IsNull() {
				in.Skip()
				out.Topics = nil
			} else {
				out.Topics = new(DSTopicsList)
				(*out.Topics).UnmarshalEasyJSON(in)
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
func easyjson7f5ba663DecodeGithubComSergeiSvistunovGorpcDebug(in *jlexer.Lexer, out *debug.Debug) {
	if in.IsNull() {
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "modules":
			if in.IsNull() {
				in.Skip()
			} else {
				in.Delim('{')
				if !in.IsDelim('}') {
					out.Modules = make(map[string]interface{})
				} else {
					out.Modules = nil
				}
				for !in.IsDelim('}') {
					key := string(in.String())
					in.WantColon()
					var v1 interface{}
					v1 = in.Interface()
					(out.Modules)[key] = v1
					in.WantComma()
				}
				in.Delim('}')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
func easyjson7f5ba663DecodeGithubComSergeiSvistunovGorpcTransportHttpJson(in *jlexer.Lexer, out *httpSessionResponse) {
	if in.IsNull() {
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "result":
			out.Result = string(in.String())
		case "data":
			out.Data = in.Interface()
		case "error":
			out.Error = string(in.String())
		case "debug":
			if in.IsNull() {
				in.Skip()
				out.Debug = nil
			} else {
				if out.Debug == nil {
					out.Debug = new(debug.Debug)
				}
				easyjson7f5ba663DecodeGithubComSergeiSvistunovGorpcDebug(in, &*out.Debug)
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}