@@ -19,7 +19,6 @@ import java.io.File
1919import kotlin.io.use
2020
2121const val noJsonIndent = " "
22- const val prettyJsonIndent = " "
2322
2423val MOSHI : Moshi by lazy {
2524 Moshi .Builder ()
@@ -32,7 +31,7 @@ val MOSHI: Moshi by lazy {
3231
3332inline fun <reified T > JsonAdapter<T>.withNulls (withNulls : Boolean ): JsonAdapter <T > {
3433 return if (withNulls) {
35- this . serializeNulls()
34+ serializeNulls()
3635 } else {
3736 this
3837 }
@@ -97,14 +96,6 @@ inline fun <reified K, reified V> BufferedSource.fromJsonMapSet(): Map<K, Set<V>
9796 return getJsonMapSetAdapter<K , V >().fromJson(this )!!
9897}
9998
100- inline fun <reified T > T.toPrettyString (withNulls : Boolean = false): String {
101- return getJsonAdapter<T >(withNulls).indent(prettyJsonIndent).toJson(this )
102- }
103-
104- inline fun <reified K , reified V > Map <K , V >.toPrettyString (withNulls : Boolean = false): String {
105- return getJsonMapAdapter<K , V >(withNulls).indent(prettyJsonIndent).toJson(this )
106- }
107-
10899/* *
109100 * Buffers writes of the set to disk, using the indent to make the output human-readable.
110101 * By default, the output is compacted.
@@ -135,16 +126,6 @@ inline fun <reified K, reified V> File.bufferWriteJsonMapSet(set: Map<K, Set<V>>
135126 }
136127}
137128
138- /* *
139- * Buffers pretty writes of the set to disk, using the indent to make the output human-readable.
140- * By default, the output is compacted.
141- *
142- * @param set The set to write to file
143- */
144- inline fun <reified T > File.bufferPrettyWriteJsonList (set : List <T >) {
145- bufferWriteJsonList(set, prettyJsonIndent)
146- }
147-
148129/* *
149130 * Buffers writes of the set to disk, using the indent to make the output human-readable.
150131 * By default, the output is compacted.
@@ -158,16 +139,6 @@ inline fun <reified T> File.bufferWriteJsonList(set: List<T>, indent: String = n
158139 }
159140}
160141
161- /* *
162- * Buffers pretty writes of the set to disk, using the indent to make the output human-readable.
163- * By default, the output is compacted.
164- *
165- * @param set The set to write to file
166- */
167- inline fun <reified T > File.bufferPrettyWriteJsonSet (set : Set <T >) {
168- bufferWriteJsonSet(set, prettyJsonIndent)
169- }
170-
171142/* *
172143 * Buffers writes of the set to disk, using the indent to make the output human-readable.
173144 * By default, the output is compacted.
0 commit comments