Class JsonPrinter

java.lang.Object
uk.co.real_logic.sbe.json.JsonPrinter

public class JsonPrinter extends Object
Pretty Print JSON based upon the given Ir.
  • Constructor Details

    • JsonPrinter

      public JsonPrinter(Ir ir)
      Create a new JSON printer for a given message Ir.
      Parameters:
      ir - for the message type.
  • Method Details

    • print

      public void print(ByteBuffer encodedMessage, StringBuilder output)
      Print the encoded message to the output.
      Parameters:
      encodedMessage - with header in buffer.
      output - to write to.
    • print

      public void print(StringBuilder output, DirectBuffer buffer, int offset)
      Print the encoded message to the output.
      Parameters:
      output - to write too.
      buffer - with encoded message and header.
      offset - at which the header begins.
    • print

      public String print(ByteBuffer encodedMessage)
      Print an encoded message to a String.
      Parameters:
      encodedMessage - with header in buffer.
      Returns:
      encoded message in JSON format.