-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enables output of comparison as json (#78)
- Loading branch information
1 parent
1e0586e
commit b5a8d81
Showing
6 changed files
with
65 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
src/main/kotlin/io/dotanuki/aaw/features/comparison/CompareContext.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package io.dotanuki.aaw.features.comparison | ||
|
||
import com.github.ajalt.mordant.terminal.Terminal | ||
import kotlinx.serialization.json.Json | ||
import net.peanuuutz.tomlkt.Toml | ||
|
||
data class CompareContext( | ||
val terminal: Terminal, | ||
val tomlSerializer: Toml | ||
val tomlSerializer: Toml, | ||
val jsonSerializer: Json | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/kotlin/io/dotanuki/aaw/features/comparison/SerializableComparison.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.dotanuki.aaw.features.comparison | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class SerializableComparison( | ||
val outcome: String, | ||
val results: List<ComparisonResult> | ||
) | ||
|
||
@Serializable | ||
data class ComparisonResult( | ||
val item: String, | ||
val category: String, | ||
val finding: String | ||
) |