Package com.yahoo.data.access.simple
Class JsonRender.StringEncoder
java.lang.Object
com.yahoo.data.access.simple.JsonRender.StringEncoder
- All Implemented Interfaces:
ArrayTraverser,ObjectTraverser
- Enclosing class:
- JsonRender
public static class JsonRender.StringEncoder
extends Object
implements ArrayTraverser, ObjectTraverser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidencodeARRAY(Inspector inspector) protected voidencodeBOOL(boolean value) protected voidencodeDATA(byte[] value) protected voidencodeDOUBLE(double value) protected voidprotected voidencodeLONG(long value) protected voidencodeOBJECT(Inspector inspector) protected voidencodeSTRING(String value) voidCallback function to implement.voidCallback function to implement.target()Returns the target this is encoding values to
-
Constructor Details
-
StringEncoder
-
-
Method Details
-
encode
-
encodeEMPTY
protected void encodeEMPTY() -
encodeBOOL
protected void encodeBOOL(boolean value) -
encodeLONG
protected void encodeLONG(long value) -
encodeDOUBLE
protected void encodeDOUBLE(double value) -
encodeSTRING
-
encodeDATA
protected void encodeDATA(byte[] value) -
encodeARRAY
-
encodeOBJECT
-
entry
Description copied from interface:ArrayTraverserCallback function to implement.- Specified by:
entryin interfaceArrayTraverser- Parameters:
idx- array index for the current array entry.inspector- accessor for the current array entry's value.
-
field
Description copied from interface:ObjectTraverserCallback function to implement.- Specified by:
fieldin interfaceObjectTraverser- Parameters:
name- the name of the current field.inspector- accessor for the current field's value.
-
target
Returns the target this is encoding values to
-