Class JSONRawMessagePrinter


  • public class JSONRawMessagePrinter
    extends java.lang.Object
    Formats RawMessage to JSON. Not thread safe.

    Usage example:

     RawMessage raw = ...
     new JSONRawMessagePrinter().append(raw, sb);
     System.out.println (sb.toString());
     
    • Field Detail

      • prettyPrint

        protected final boolean prettyPrint
      • skipNull

        protected final boolean skipNull
      • indent

        protected int indent
      • typeField

        protected final java.lang.String typeField
      • htmlSafe

        protected final boolean htmlSafe
      • printInstrumentType

        protected final boolean printInstrumentType
      • printType

        protected final PrintType printType
    • Constructor Detail

      • JSONRawMessagePrinter

        public JSONRawMessagePrinter()
      • JSONRawMessagePrinter

        public JSONRawMessagePrinter​(boolean printInstrumentType)
      • JSONRawMessagePrinter

        @Deprecated
        public JSONRawMessagePrinter​(boolean prettyPrint,
                                     boolean skipNull,
                                     DataEncoding dataEncoding,
                                     boolean htmlSafe,
                                     boolean printInstrumentType,
                                     PrintType printType)
        Deprecated.
      • JSONRawMessagePrinter

        public JSONRawMessagePrinter​(boolean prettyPrint,
                                     boolean skipNull,
                                     DataEncoding dataEncoding,
                                     boolean htmlSafe,
                                     boolean printInstrumentType,
                                     PrintType printType,
                                     java.lang.String typeField)
      • JSONRawMessagePrinter

        public JSONRawMessagePrinter​(boolean prettyPrint,
                                     boolean skipNull,
                                     DataEncoding dataEncoding,
                                     boolean htmlSafe,
                                     boolean printInstrumentType,
                                     PrintType printType,
                                     boolean printStaticFields,
                                     java.lang.String typeField)
    • Method Detail

      • append

        public void append​(RawMessage raw,
                           java.lang.StringBuilder sb)
      • appendHeader

        protected void appendHeader​(RawMessage raw,
                                    java.lang.StringBuilder sb)
      • appendField

        protected boolean appendField​(StaticFieldInfo field,
                                      java.lang.StringBuilder sb)
      • appendValue

        protected void appendValue​(DataType dataType,
                                   java.lang.String value,
                                   java.lang.StringBuilder sb)
      • appendType

        protected void appendType​(java.lang.StringBuilder sb,
                                  java.lang.String fullType)
      • appendBinary

        protected void appendBinary​(byte[] bytes,
                                    java.lang.StringBuilder sb)
      • appendTimestamp

        protected boolean appendTimestamp​(long timestamp,
                                          java.lang.StringBuilder sb)
      • appendNanoTime

        protected void appendNanoTime​(long nanoTime,
                                      java.lang.StringBuilder sb)
      • appendTime

        protected boolean appendTime​(int timeOfDay,
                                     java.lang.StringBuilder sb)
      • appendString

        protected void appendString​(java.lang.CharSequence text,
                                    java.lang.StringBuilder sb)
      • appendAlphanumeric

        protected void appendAlphanumeric​(ReadableValue decoder,
                                          java.lang.StringBuilder sb)
      • appendChar

        protected void appendChar​(char ch,
                                  java.lang.StringBuilder sb)
      • appendDecimal

        protected boolean appendDecimal​(long value,
                                        java.lang.StringBuilder sb)
      • appendFloat

        protected boolean appendFloat​(float f,
                                      java.lang.StringBuilder sb)
      • appendDouble

        protected boolean appendDouble​(double d,
                                       java.lang.StringBuilder sb)
      • appendSeparator

        protected void appendSeparator​(java.lang.StringBuilder sb)
      • appendBlock

        protected void appendBlock​(char brace,
                                   java.lang.StringBuilder sb)
      • appendIndent

        protected void appendIndent​(java.lang.StringBuilder sb)