package easyjson

import (
	jlexer 
	
)

// UnknownFieldsProxy implemets UnknownsUnmarshaler and UnknownsMarshaler
// use it as embedded field in your structure to parse and then serialize unknown struct fields
type UnknownFieldsProxy struct {
	unknownFields map[string][]byte
}

func ( *UnknownFieldsProxy) ( *jlexer.Lexer,  string) {
	if .unknownFields == nil {
		.unknownFields = make(map[string][]byte, 1)
	}
	.unknownFields[] = .Raw()
}

func ( UnknownFieldsProxy) ( *jwriter.Writer,  bool) {
	for ,  := range .unknownFields {
		if  {
			 = false
		} else {
			.RawByte(',')
		}
		.String(string())
		.RawByte(':')
		.Raw(, nil)
	}
}