func NewPrettyJsonWriter() WriteCloser {
	return newGenericWriter(new(prettyJsonWriter), nil)
}
NewPrettyJsonWriter returns a WriteCloser that serializes objects using JSON. This representation delimits fields and
array items using newlines and provides indentation for nested objects. It generates a lot of unnecessary bytes and
is intended primarily for debugging or human-readability purposes.
package restlicodec
import (
	"math"
	"github.com/mailru/easyjson/jwriter"
)
type compactJsonWriter struct {
	jwriter.Writer
}
func NewCompactJsonWriter() WriteCloser {
	return newGenericWriter(new(compactJsonWriter), nil)
}
func NewCompactJsonWriterWithExcludedFields(excludedFields PathSpec) WriteCloser {
	return newGenericWriter(new(compactJsonWriter), excludedFields)
}
func (c *compactJsonWriter) writeMapStart() {
	c.Writer.RawByte('{')
}
func (c *compactJsonWriter) writeKey(key string) {
	c.Writer.RawByte('"')
	c.Writer.RawString(key)
	c.Writer.RawByte('"')
}
func (c *compactJsonWriter) writeKeyDelimiter() {
	c.Writer.RawByte(':')
}
func (c *compactJsonWriter) writeEntryDelimiter() {
	c.Writer.RawByte(',')
}
func (c *compactJsonWriter) writeMapEnd() {
	c.Writer.RawByte('}')
}
func (c *compactJsonWriter) writeArrayStart() {
	c.Writer.RawByte('[')
}
func (c *compactJsonWriter) writeArrayItemDelimiter() {
	c.Writer.RawByte(',')
}
func (c *compactJsonWriter) writeArrayEnd() {
	c.Writer.RawByte(']')
}
func (c *compactJsonWriter) WriteInt32(v int32) {
	c.Writer.Int32(v)
}
func (c *compactJsonWriter) WriteInt64(v int64) {
	c.Writer.Int64(v)
}
func (c *compactJsonWriter) WriteFloat32(v float32) {
	c.WriteFloat64(float64(v))
}
func (c *compactJsonWriter) WriteFloat64(v float64) {
	switch {
	case math.IsInf(v, 1):
		c.Writer.String("Infinity")
	case math.IsInf(v, -1):
		c.Writer.String("-Infinity")
	case math.IsNaN(v):
		c.Writer.String("NaN")
	default:
		c.Writer.Float64(v)
	}
}
func (c *compactJsonWriter) WriteBool(v bool) {
	c.Writer.Bool(v)
}
func (c *compactJsonWriter) WriteString(v string) {
	c.Writer.String(v)
}
func (c *compactJsonWriter) WriteBytes(v []byte) {
	c.String(string(v))
}
type prettyJsonWriter struct {
	compactJsonWriter
	indent string
}