Skip to content

Commit

Permalink
feat: Replace gson by jackson
Browse files Browse the repository at this point in the history
  • Loading branch information
felipebz committed Jul 3, 2024
1 parent dd2194c commit 134ee17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {
implementation("org.sonarsource.api.plugin:sonar-plugin-api:9.14.0.375")
implementation("org.jcommander:jcommander:1.83")
implementation("com.felipebz.zpa:sonar-zpa-plugin:3.5.1")
implementation("com.google.code.gson:gson:2.11.0")
implementation("com.fasterxml.jackson.core:jackson-databind:2.17.1")
implementation("org.pf4j:pf4j:3.11.1")
implementation("org.slf4j:slf4j-jdk14:2.0.13")
testImplementation(kotlin("test"))
Expand Down
6 changes: 3 additions & 3 deletions src/main/kotlin/br/com/felipezorzo/zpa/cli/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import br.com.felipezorzo.zpa.cli.sqissue.SecondaryLocation
import br.com.felipezorzo.zpa.cli.sqissue.TextRange
import com.beust.jcommander.JCommander
import com.beust.jcommander.ParameterException
import com.google.gson.Gson
import com.fasterxml.jackson.databind.ObjectMapper
import org.sonar.plsqlopen.CustomAnnotationBasedRulesDefinition
import org.sonar.plsqlopen.metadata.FormsMetadata
import org.sonar.plsqlopen.rules.ActiveRules
Expand Down Expand Up @@ -210,8 +210,8 @@ class Main(private val args: Arguments) {
}
val genericReport = GenericIssueData(genericIssues)

val gson = Gson()
return gson.toJson(genericReport)
val mapper = ObjectMapper()
return mapper.writeValueAsString(genericReport)
}

private fun createTextRange(startLine: Int, endLine: Int, startLineOffset: Int, endLineOffset: Int): TextRange {
Expand Down

0 comments on commit 134ee17

Please sign in to comment.