Class JsonFormat.Encoder

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void encode()  
      void entry​(int idx, Inspector inspector)
      Callback function to implement.
      void field​(java.lang.String name, Inspector inspector)
      Callback function to implement.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Encoder

        public Encoder​(Inspector value,
                       java.io.OutputStream out,
                       boolean compact)
    • Method Detail

      • encode

        public void encode()
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • 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​(java.lang.String name,
                          Inspector inspector)
        Description copied from interface: ObjectTraverser
        Callback function to implement.
        Specified by:
        field in interface ObjectTraverser
        Parameters:
        name - symbol name for the current field.
        inspector - accessor for the current field's value.