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 Constructor Description StringEncoder(StringBuilder out, boolean compact)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encode(Inspector top)
protected void
encodeARRAY(Inspector inspector)
protected void
encodeBOOL(boolean value)
protected void
encodeDATA(byte[] value)
protected void
encodeDOUBLE(double value)
protected void
encodeEMPTY()
protected void
encodeLONG(long value)
protected void
encodeOBJECT(Inspector inspector)
protected void
encodeSTRING(String value)
void
entry(int idx, Inspector inspector)
Callback function to implement.void
field(String name, Inspector inspector)
Callback function to implement.StringBuilder
target()
Returns the target this is encoding values to
-
-
-
Constructor Detail
-
StringEncoder
public StringEncoder(StringBuilder out, boolean compact)
-
-
Method Detail
-
encode
public void encode(Inspector top)
-
encodeEMPTY
protected void encodeEMPTY()
-
encodeBOOL
protected void encodeBOOL(boolean value)
-
encodeLONG
protected void encodeLONG(long value)
-
encodeDOUBLE
protected void encodeDOUBLE(double value)
-
encodeSTRING
protected void encodeSTRING(String value)
-
encodeDATA
protected void encodeDATA(byte[] value)
-
encodeARRAY
protected void encodeARRAY(Inspector inspector)
-
encodeOBJECT
protected void encodeOBJECT(Inspector inspector)
-
entry
public void entry(int idx, Inspector inspector)
Description copied from interface:ArrayTraverser
Callback function to implement.- Specified by:
entry
in interfaceArrayTraverser
- Parameters:
idx
- array index for the current array entry.inspector
- accessor for the current array entry's value.
-
field
public void field(String name, Inspector inspector)
Description copied from interface:ObjectTraverser
Callback function to implement.- Specified by:
field
in interfaceObjectTraverser
- Parameters:
name
- the name of the current field.inspector
- accessor for the current field's value.
-
target
public StringBuilder target()
Returns the target this is encoding values to
-
-