// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.

package main

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 easyjson22b57fa5DecodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi(in *jlexer.Lexer, out *World) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.ID = uint16(in.Uint16())
		case "randomNumber":
			out.RandomNumber = uint16(in.Uint16())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson22b57fa5EncodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi(out *jwriter.Writer, in World) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"id\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		out.Uint16(uint16(in.ID))
	}
	{
		const prefix string = ",\"randomNumber\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		out.Uint16(uint16(in.RandomNumber))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v World) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson22b57fa5EncodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v World) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson22b57fa5EncodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *World) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson22b57fa5DecodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *World) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson22b57fa5DecodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi(l, v)
}
func easyjson22b57fa5DecodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi1(in *jlexer.Lexer, out *Message) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "message":
			out.Message = string(in.String())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson22b57fa5EncodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi1(out *jwriter.Writer, in Message) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"message\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		out.String(string(in.Message))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v Message) MarshalJSON() ([]byte, error) {
	println("marshal")
	w := jwriter.Writer{}
	easyjson22b57fa5EncodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi1(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Message) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson22b57fa5EncodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi1(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *Message) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson22b57fa5DecodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi1(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Message) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson22b57fa5DecodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi1(l, v)
}
func easyjson22b57fa5DecodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi2(in *jlexer.Lexer, out *Fortune) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeString()
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.ID = uint16(in.Uint16())
		case "message":
			out.Message = string(in.String())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson22b57fa5EncodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi2(out *jwriter.Writer, in Fortune) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"id\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		out.Uint16(uint16(in.ID))
	}
	{
		const prefix string = ",\"message\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		out.String(string(in.Message))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v Fortune) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson22b57fa5EncodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi2(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Fortune) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson22b57fa5EncodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi2(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *Fortune) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson22b57fa5DecodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi2(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Fortune) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson22b57fa5DecodeGithubComTechEmpowerFrameworkBenchmarksFrameworksGoChiSrcChi2(l, v)
}
