Package uk.co.real_logic.sbe.json
Class JsonPrinter
java.lang.Object
uk.co.real_logic.sbe.json.JsonPrinter
Pretty Print JSON based upon the given Ir.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprint(StringBuilder output, DirectBuffer buffer, int offset) Print the encoded message to the output.print(ByteBuffer encodedMessage) Print an encoded message to a String.voidprint(ByteBuffer encodedMessage, StringBuilder output) Print the encoded message to the output.
-
Constructor Details
-
JsonPrinter
Create a new JSON printer for a given message Ir.- Parameters:
ir- for the message type.
-
-
Method Details
-
print
Print the encoded message to the output.- Parameters:
encodedMessage- with header in buffer.output- to write to.
-
print
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
Print an encoded message to a String.- Parameters:
encodedMessage- with header in buffer.- Returns:
- encoded message in JSON format.
-