[android-components](../../index.md) / [mozilla.components.service.fxa](../index.md) / [FxaDeviceSettingsCache](index.md) / [toJSON](./to-j-s-o-n.md)

# toJSON

`fun DeviceSettings.toJSON(): <ERROR CLASS>` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/FxaDeviceSettingsCache.kt#L32)

Overrides [SharedPreferencesCache.toJSON](../../mozilla.components.support.base.utils/-shared-preferences-cache/to-j-s-o-n.md)

A conversion method from [T](../../mozilla.components.support.base.utils/-shared-preferences-cache/index.md#T) into a [JSONObject](#).

