# JSONAble

Summary:[Nested Classes](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble#nestedclasses)\|[Methods](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble#pubmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble#)  

# JSONAble

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


interface
JSONAble
`  
`


`

|--------------------------------------------------|
| android.support.test.espresso.web.model.JSONAble |

|---|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble#)Known Indirect Subclasses [ElementReference](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference),[Evaluation](https://developer.android.com/reference/android/support/test/espresso/web/model/Evaluation),[WindowReference](https://developer.android.com/reference/android/support/test/espresso/web/model/WindowReference) |----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------| | [ElementReference](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference) | A reference to a javascript element existing within a WebView.      | | [Evaluation](https://developer.android.com/reference/android/support/test/espresso/web/model/Evaluation)             | Represents the results of a Javascript execution.                   | | [WindowReference](https://developer.android.com/reference/android/support/test/espresso/web/model/WindowReference)   | A reference to a javascript window/frame existing within a WebView. | ||

<br />

*** ** * ** ***

Allows implementors to instruct ModelCodec on how to encode this object as JSON.

## Summary

|                                                                                                                 ### Nested classes                                                                                                                 ||
|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` interface` | [JSONAble.DeJSONFactory](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble.DeJSONFactory) Allows implementors to replace a JSONObject (representated as a map) with a more applicable object. |

|                                                                                                  ### Public methods                                                                                                  ||
|-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[toJSONString](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble#toJSONString())`() ` |

## Public methods

### toJSONString

```
String toJSONString ()
```

<br />

<br />

|                                     Returns                                     ||
|-------------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String.html) | <br /> |

-

  ## Interfaces

  - [Atom](https://developer.android.com/reference/android/support/test/espresso/web/model/Atom)
  - [JSONAble](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble)
  - [JSONAble.DeJSONFactory](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble.DeJSONFactory)
  - [TransformingAtom.Transformer](https://developer.android.com/reference/android/support/test/espresso/web/model/TransformingAtom.Transformer)
-

  ## Classes

  - [Atoms](https://developer.android.com/reference/android/support/test/espresso/web/model/Atoms)
  - [ElementReference](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference)
  - [Evaluation](https://developer.android.com/reference/android/support/test/espresso/web/model/Evaluation)
  - [ModelCodec](https://developer.android.com/reference/android/support/test/espresso/web/model/ModelCodec)
  - [SimpleAtom](https://developer.android.com/reference/android/support/test/espresso/web/model/SimpleAtom)
  - [TransformingAtom](https://developer.android.com/reference/android/support/test/espresso/web/model/TransformingAtom)
  - [WindowReference](https://developer.android.com/reference/android/support/test/espresso/web/model/WindowReference)
-

  ## Enums

  - [SimpleAtom.ElementReferencePlacement](https://developer.android.com/reference/android/support/test/espresso/web/model/SimpleAtom.ElementReferencePlacement)