-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove the use of jakarta.json.Json
- Loading branch information
1 parent
31a9aa0
commit d917688
Showing
6 changed files
with
39 additions
and
62 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
12 changes: 2 additions & 10 deletions
12
drivers/jvm/core/src/main/kotlin/io/pact/plugins/jvm/core/Json.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,13 +1,5 @@ | ||
package io.pact.plugins.jvm.core | ||
|
||
import jakarta.json.JsonNumber | ||
import jakarta.json.JsonString | ||
import jakarta.json.JsonValue | ||
import au.com.dius.pact.core.support.json.JsonValue | ||
|
||
fun toInteger(value: JsonValue?) = | ||
if (value is JsonNumber) value.intValue() | ||
else null | ||
|
||
fun toString(value: JsonValue?) = | ||
if (value is JsonString) value.string | ||
else value?.toString() | ||
fun toInteger(value: JsonValue?) = value?.asNumber()?.toInt() |
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