當前位置: 首頁>>代碼示例>>Golang>>正文


Golang Lexer.Int方法代碼示例

本文整理匯總了Golang中github.com/mailru/easyjson/jlexer.Lexer.Int方法的典型用法代碼示例。如果您正苦於以下問題:Golang Lexer.Int方法的具體用法?Golang Lexer.Int怎麽用?Golang Lexer.Int使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在github.com/mailru/easyjson/jlexer.Lexer的用法示例。


在下文中一共展示了Lexer.Int方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: easyjson_decode_finance_provider_yahoo_Result

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('}')
}
開發者ID:gobwas,項目名稱:kursobot,代碼行數:26,代碼來源:types_easyjson.go

示例2: easyjson_decode_go_serialization_benchmarks_A

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('}')
}
開發者ID:alecthomas,項目名稱:go_serialization_benchmarks,代碼行數:32,代碼來源:structdef_easyjson.go

示例3: UnmarshalEasyJSON

// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (v *Int) UnmarshalEasyJSON(l *jlexer.Lexer) {
	if l.IsNull() {
		l.Skip()
		*v = Int{}
	} else {
		v.V = l.Int()
		v.Defined = true
	}
}
開發者ID:,項目名稱:,代碼行數:10,代碼來源:

示例4: easyjson_decode_github_com_buger_jsonparser_benchmark_CBGithub

func easyjson_decode_github_com_buger_jsonparser_benchmark_CBGithub(in *jlexer.Lexer, out *CBGithub) {
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "followers":
			out.Followers = in.Int()
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
}
開發者ID:qband,項目名稱:down,代碼行數:20,代碼來源:benchmark_easyjson.go

示例5: easyjson_decode_github_com_dimiro1_experiments_easyjson_Person

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('}')
}
開發者ID:dimiro1,項目名稱:experiments,代碼行數:22,代碼來源:easyjson_easyjson.go

示例6: easyjson_decode_github_com_buger_jsonparser_benchmark_DSTopic

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('}')
}
開發者ID:qband,項目名稱:down,代碼行數:22,代碼來源:benchmark_easyjson.go

示例7: easyjson_decode_github_com_buger_jsonparser_benchmark_SmallPayload

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('}')
}
開發者ID:qband,項目名稱:down,代碼行數:36,代碼來源:benchmark_easyjson.go


注:本文中的github.com/mailru/easyjson/jlexer.Lexer.Int方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。