Skip to content

Commit

Permalink
Replace kotlinx with jackson for json formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jvmusin committed Feb 29, 2024
1 parent 877d6f1 commit 3eee7a4
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.github.jvmusin.polybacs.sybon

import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import io.github.jvmusin.polybacs.sybon.api.SybonCheckingApi
import io.github.jvmusin.polybacs.sybon.api.SybonSubmissionResult
import io.github.jvmusin.polybacs.sybon.api.SybonSubmissionResult.BuildResult
Expand All @@ -12,8 +13,6 @@ import io.kotest.matchers.collections.shouldBeSingleton
import io.kotest.matchers.collections.shouldContainAll
import io.kotest.matchers.collections.shouldHaveSize
import io.kotest.matchers.shouldBe
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import org.springframework.boot.test.context.SpringBootTest

@SpringBootTest
Expand Down Expand Up @@ -77,7 +76,7 @@ class SybonCheckingApiTests(api: SybonCheckingApi) : StringSpec({
"Test getResults test groups results for accepted C++ solution" {
val submissionId = 466994
val result = api.getResults(submissionId.toString()).single()
println(Json { prettyPrint = true }.encodeToString(result))
println(jacksonObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(result))
}
}) {
companion object {
Expand Down

0 comments on commit 3eee7a4

Please sign in to comment.