Skip to content

Commit c465cc7

Browse files
committed
📝 update readme example
1 parent 16e64a5 commit c465cc7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ dependencies {
8282
import io.github.techouse.qskotlin.QS
8383

8484
// Decode
85-
val obj = QS.decode("foo[bar]=baz&foo[list][]=a&foo[list][]=b")
85+
val obj: Map<String, Any?> = QS.decode("foo[bar]=baz&foo[list][]=a&foo[list][]=b")
8686
// -> mapOf("foo" to mapOf("bar" to "baz", "list" to listOf("a", "b")))
8787

8888
// Encode
89-
val qs = QS.encode(mapOf("foo" to mapOf("bar" to "baz")))
89+
val qs: String = QS.encode(mapOf("foo" to mapOf("bar" to "baz")))
9090
// -> "foo%5Bbar%5D=baz"
9191
```
9292

@@ -98,11 +98,11 @@ val qs = QS.encode(mapOf("foo" to mapOf("bar" to "baz")))
9898

9999
```kotlin
100100
// Decode
101-
val decoded = QS.decode("a=c")
101+
val decoded: Map<String, Any?> = QS.decode("a=c")
102102
// => mapOf("a" to "c")
103103

104104
// Encode
105-
val encoded = QS.encode(mapOf("a" to "c"))
105+
val encoded: String = QS.encode(mapOf("a" to "c"))
106106
// => "a=c"
107107
```
108108

0 commit comments

Comments
 (0)