private void validateId(final int schemaId)
    {
        if (schemaId != ir.id())
        {
            throw new IllegalArgumentException("Required schema id " + ir.id() + " but was " + schemaId);
        }
    }
Print an encoded message to a String.

@param encodedMessage with header in buffer.
@return encoded message in JSON format.
sbe-tool/src/main/java/uk/co/real_logic/sbe/json/JsonPrinter.java