code: @Override
      public String toJSON() {
          final ObjectMapper mapper = buildObjectMapperForSerialization();
          try {
              return mapper.writeValueAsString(this);
          } catch (JsonProcessingException e) {
              throw new IllegalStateException("Object cannot be parsed as JSON.", e);
          }
      }
docs: Converts this message to its JSON string representation.
  
  @return JSON encoded data that represents this message.