12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
- package handlers
- 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 easyjson89aae3efDecodeGoStdSrc(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 easyjson89aae3efEncodeGoStdSrc(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) {
- w := jwriter.Writer{}
- easyjson89aae3efEncodeGoStdSrc(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v Message) MarshalEasyJSON(w *jwriter.Writer) {
- easyjson89aae3efEncodeGoStdSrc(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *Message) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjson89aae3efDecodeGoStdSrc(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *Message) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjson89aae3efDecodeGoStdSrc(l, v)
- }
|