Class JsonRender.StringEncoder

    • 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 interface ArrayTraverser
        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 interface ObjectTraverser
        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