Skip to content
Snippets Groups Projects
Commit c6832515 authored by JustAnotherChristoph's avatar JustAnotherChristoph Committed by Christopher Konkel
Browse files

Replaced GSON with Jackson ObjectMapper in MetricFetcher

parent 76c518c7
No related branches found
No related tags found
1 merge request!292Replace GSON with Jackson ObjectMapper
This commit is part of merge request !292. Comments created here will be created in the context of that merge request.
package rocks.theodolite.kubernetes.slo
import com.google.gson.Gson
import com.fasterxml.jackson.databind.ObjectMapper
import khttp.get
import khttp.responses.Response
import mu.KotlinLogging
......@@ -68,7 +68,7 @@ class MetricFetcher(private val prometheusURL: String, private val offset: Durat
* @return a [PrometheusResponse]
*/
private fun parseValues(values: Response): PrometheusResponse {
return Gson().fromJson<PrometheusResponse>(
return ObjectMapper().readValue<PrometheusResponse>(
values.jsonObject.toString(),
PrometheusResponse::class.java
)
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment