static ObjectNode logsToJson ( LinkedList < TelemetryData > telemetryData ) { ObjectNode node = mapper . createObjectNode ( ) ; ArrayNode logs = mapper . createArrayNode ( ) ; for ( TelemetryData data : telemetryData ) { logs . add ( data . toJson ( ) ) ; } node . set ( "logs" , logs ) ; return node ; }
convert a list of log to a JSON object