[android-components](../../index.md) / [mozilla.components.support.ktx.android.org.json](../index.md) / [kotlin.collections.Map](index.md) / [toJSON](./to-j-s-o-n.md)

# toJSON

`fun `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>.toJSON(): `[`JSONObject`](https://developer.android.com/reference/org/json/JSONObject.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/org/json/JSONObject.kt#L73)

Convert a Map&lt;String, String&gt; to a JSONObject

