当前位置: 首页>>代码示例>>Golang>>正文


Golang Writer.RawByte方法代码示例

本文整理汇总了Golang中github.com/mailru/easyjson/jwriter.Writer.RawByte方法的典型用法代码示例。如果您正苦于以下问题:Golang Writer.RawByte方法的具体用法?Golang Writer.RawByte怎么用?Golang Writer.RawByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在github.com/mailru/easyjson/jwriter.Writer的用法示例。


在下文中一共展示了Writer.RawByte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: easyjson_encode_github_com_buger_jsonparser_benchmark_CBGravatar

func easyjson_encode_github_com_buger_jsonparser_benchmark_CBGravatar(out *jwriter.Writer, in *CBGravatar) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"avatars\":")
	out.RawByte('[')
	for v10, v11 := range in.Avatars {
		if v10 > 0 {
			out.RawByte(',')
		}
		if v11 == nil {
			out.RawString("null")
		} else {
			(*v11).MarshalEasyJSON(out)
		}
	}
	out.RawByte(']')
	out.RawByte('}')
}
开发者ID:qband,项目名称:down,代码行数:23,代码来源:benchmark_easyjson.go

示例2: easyjson_encode_github_com_buger_jsonparser_benchmark_CBPerson

func easyjson_encode_github_com_buger_jsonparser_benchmark_CBPerson(out *jwriter.Writer, in *CBPerson) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"name\":")
	if in.Name == nil {
		out.RawString("null")
	} else {
		(*in.Name).MarshalEasyJSON(out)
	}
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"github\":")
	if in.Github == nil {
		out.RawString("null")
	} else {
		(*in.Github).MarshalEasyJSON(out)
	}
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"gravatar\":")
	if in.Gravatar == nil {
		out.RawString("null")
	} else {
		(*in.Gravatar).MarshalEasyJSON(out)
	}
	out.RawByte('}')
}
开发者ID:qband,项目名称:down,代码行数:36,代码来源:benchmark_easyjson.go

示例3: easyjson_encode_github_com_dimiro1_experiments_easyjson_Person

func easyjson_encode_github_com_dimiro1_experiments_easyjson_Person(out *jwriter.Writer, in *Person) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"name\":")
	out.String(in.Name)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"age\":")
	out.Int(in.Age)
	out.RawByte('}')
}
开发者ID:dimiro1,项目名称:experiments,代码行数:18,代码来源:easyjson_easyjson.go

示例4: easyjson_encode_github_com_buger_jsonparser_benchmark_DSTopic

func easyjson_encode_github_com_buger_jsonparser_benchmark_DSTopic(out *jwriter.Writer, in *DSTopic) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"id\":")
	out.Int(in.Id)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"slug\":")
	out.String(in.Slug)
	out.RawByte('}')
}
开发者ID:qband,项目名称:down,代码行数:18,代码来源:benchmark_easyjson.go

示例5: easyjson_encode_finance_provider_yahoo_Response

func easyjson_encode_finance_provider_yahoo_Response(out *jwriter.Writer, in *Response) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"query\":")
	(in.Query).MarshalEasyJSON(out)
	out.RawByte('}')
}
开发者ID:gobwas,项目名称:kursobot,代码行数:12,代码来源:types_easyjson.go

示例6: easyjson_encode_github_com_buger_jsonparser_benchmark_CBAvatar

func easyjson_encode_github_com_buger_jsonparser_benchmark_CBAvatar(out *jwriter.Writer, in *CBAvatar) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"url\":")
	out.String(in.Url)
	out.RawByte('}')
}
开发者ID:qband,项目名称:down,代码行数:12,代码来源:benchmark_easyjson.go

示例7: easyjson_encode_github_com_buger_jsonparser_benchmark_CBGithub

func easyjson_encode_github_com_buger_jsonparser_benchmark_CBGithub(out *jwriter.Writer, in *CBGithub) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"followers\":")
	out.Int(in.Followers)
	out.RawByte('}')
}
开发者ID:qband,项目名称:down,代码行数:12,代码来源:benchmark_easyjson.go

示例8: easyjson_encode_github_com_buger_jsonparser_benchmark_CBName

func easyjson_encode_github_com_buger_jsonparser_benchmark_CBName(out *jwriter.Writer, in *CBName) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"full_name\":")
	out.String(in.FullName)
	out.RawByte('}')
}
开发者ID:qband,项目名称:down,代码行数:12,代码来源:benchmark_easyjson.go

示例9: easyjson_encode_github_com_buger_jsonparser_benchmark_DSUser

func easyjson_encode_github_com_buger_jsonparser_benchmark_DSUser(out *jwriter.Writer, in *DSUser) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"username\":")
	out.String(in.Username)
	out.RawByte('}')
}
开发者ID:qband,项目名称:down,代码行数:12,代码来源:benchmark_easyjson.go

示例10: easyjson_encode_finance_provider_yahoo_Result

func easyjson_encode_finance_provider_yahoo_Result(out *jwriter.Writer, in *Result) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"count\":")
	out.Int(in.Count)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"created\":")
	out.String(in.Created)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"lang\":")
	out.String(in.Lang)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"results\":")
	(in.Results).MarshalEasyJSON(out)
	out.RawByte('}')
}
开发者ID:gobwas,项目名称:kursobot,代码行数:30,代码来源:types_easyjson.go

示例11: easyjson_encode_github_com_buger_jsonparser_benchmark_SmallPayload

func easyjson_encode_github_com_buger_jsonparser_benchmark_SmallPayload(out *jwriter.Writer, in *SmallPayload) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"st\":")
	out.Int(in.St)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"sid\":")
	out.Int(in.Sid)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"tt\":")
	out.String(in.Tt)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"gr\":")
	out.Int(in.Gr)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"uuid\":")
	out.String(in.Uuid)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"ip\":")
	out.String(in.Ip)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"ua\":")
	out.String(in.Ua)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"tz\":")
	out.Int(in.Tz)
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"v\":")
	out.Int(in.V)
	out.RawByte('}')
}
开发者ID:qband,项目名称:down,代码行数:60,代码来源:benchmark_easyjson.go

示例12: easyjson_encode_github_com_buger_jsonparser_benchmark_LargePayload

func easyjson_encode_github_com_buger_jsonparser_benchmark_LargePayload(out *jwriter.Writer, in *LargePayload) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"users\":")
	out.RawByte('[')
	for v2, v3 := range in.Users {
		if v2 > 0 {
			out.RawByte(',')
		}
		if v3 == nil {
			out.RawString("null")
		} else {
			(*v3).MarshalEasyJSON(out)
		}
	}
	out.RawByte(']')
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"topics\":")
	if in.Topics == nil {
		out.RawString("null")
	} else {
		(*in.Topics).MarshalEasyJSON(out)
	}
	out.RawByte('}')
}
开发者ID:qband,项目名称:down,代码行数:33,代码来源:benchmark_easyjson.go

示例13: easyjson7f5ba663EncodeGithubComSergeiSvistunovGorpcTransportHttpJson

func easyjson7f5ba663EncodeGithubComSergeiSvistunovGorpcTransportHttpJson(out *jwriter.Writer, in httpSessionResponse) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"result\":")
	out.String(string(in.Result))
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"data\":")
	if d, ok := in.Data.(json.Marshaler); ok {
		out.Raw(d.MarshalJSON())
	} else {
		out.Raw(json.Marshal(in.Data))
	}
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"error\":")
	out.String(string(in.Error))
	if in.Debug != nil {
		if !first {
			out.RawByte(',')
		}
		first = false
		out.RawString("\"debug\":")
		if in.Debug == nil {
			out.RawString("null")
		} else {
			easyjson7f5ba663EncodeGithubComSergeiSvistunovGorpcDebug(out, *in.Debug)
		}
	}
	out.RawByte('}')
}
开发者ID:sergei-svistunov,项目名称:gorpc,代码行数:40,代码来源:http_json_easyjson.go

示例14: easyjson_encode_github_com_buger_jsonparser_benchmark_MediumPayload

func easyjson_encode_github_com_buger_jsonparser_benchmark_MediumPayload(out *jwriter.Writer, in *MediumPayload) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"person\":")
	if in.Person == nil {
		out.RawString("null")
	} else {
		(*in.Person).MarshalEasyJSON(out)
	}
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"company\":")
	out.RawByte('{')
	v8_first := true
	for v8_name, v8_value := range in.Company {
		if !v8_first {
			out.RawByte(',')
		}
		v8_first = false
		out.String(v8_name)
		out.Raw(json.Marshal(v8_value))
	}
	out.RawByte('}')
	out.RawByte('}')
}
开发者ID:qband,项目名称:down,代码行数:32,代码来源:benchmark_easyjson.go

示例15: easyjson_encode_github_com_buger_jsonparser_benchmark_DSTopicsList

func easyjson_encode_github_com_buger_jsonparser_benchmark_DSTopicsList(out *jwriter.Writer, in *DSTopicsList) {
	out.RawByte('{')
	first := true
	_ = first
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"topics\":")
	out.RawByte('[')
	for v5, v6 := range in.Topics {
		if v5 > 0 {
			out.RawByte(',')
		}
		if v6 == nil {
			out.RawString("null")
		} else {
			(*v6).MarshalEasyJSON(out)
		}
	}
	out.RawByte(']')
	if !first {
		out.RawByte(',')
	}
	first = false
	out.RawString("\"more_topics_url\":")
	out.String(in.MoreTopicsUrl)
	out.RawByte('}')
}
开发者ID:qband,项目名称:down,代码行数:29,代码来源:benchmark_easyjson.go


注:本文中的github.com/mailru/easyjson/jwriter.Writer.RawByte方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。