Send for json issue

mail@pastecode.io avatar
unknown
plain_text
2 months ago
714 B
1
Indexable
Never
try {
      log.info("MessagePayload {}", messagePayload);
      final ObjectMapper objectMapper = new ObjectMapper();
      final JsonNode jsonNode = objectMapper.readTree(messagePayload);
      log.info("JsonNode {}", jsonNode);
      final String message = jsonNode.get("Message").asText();
      log.info("message {}", message);
      final AnalyticsEngineAuditInfoDto analyticsEngineAuditInfoDto =
          objectMapper.readValue(message, AnalyticsEngineAuditInfoDto.class);
      log.info("AnalyticsEngineAuditInfoDto {}", analyticsEngineAuditInfoDto);
    } catch (final Exception e) {
      log.info("Error case", e);
      throw new CallRecordingBaseRuntimeException(ANALYTICS_ENGINE_PARSER_ERROR);
    }
Leave a Comment