-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: more common json formatting (#2432)
remove a space before the colon at json format.
- Loading branch information
Showing
8 changed files
with
76 additions
and
8 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
backend/data/src/main/kotlin/io/tolgee/configuration/CustomPrettyPrinterConfiguration.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,13 @@ | ||
package io.tolgee.configuration | ||
|
||
import io.tolgee.formats.genericStructuredFile.out.CustomPrettyPrinter | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
class CustomPrettyPrinterConfiguration { | ||
@Bean | ||
fun customPrettyPrinter(): CustomPrettyPrinter { | ||
return CustomPrettyPrinter() | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...d/data/src/main/kotlin/io/tolgee/formats/genericStructuredFile/out/CustomPrettyPrinter.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,14 @@ | ||
package io.tolgee.formats.genericStructuredFile.out | ||
|
||
import com.fasterxml.jackson.core.JsonGenerator | ||
import com.fasterxml.jackson.core.util.DefaultPrettyPrinter | ||
|
||
class CustomPrettyPrinter : DefaultPrettyPrinter() { | ||
override fun createInstance(): DefaultPrettyPrinter { | ||
return CustomPrettyPrinter() | ||
} | ||
|
||
override fun writeObjectFieldValueSeparator(jg: JsonGenerator) { | ||
jg.writeRaw(": ") | ||
} | ||
} |
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
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