# A2uiJsonReader

Artifact: [androidx.a2ui:a2ui-model](https://developer.android.com/jetpack/androidx/releases/a2ui) [View Source](https://cs.android.com/search?q=file:androidx/a2ui/model/processor/A2uiJsonReader.kt+class:androidx.a2ui.model.processor.A2uiJsonReader) Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

*** ** * ** ***


```
public interface A2uiJsonReader extends AutoCloseable
```

<br />

*** ** * ** ***

Reads a stream of JSON tokens.

Use this interface to pull JSON tokens sequentially without loading the entire document.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#beginArray()()` Consumes the opening delimiter of a JSON array. |
| `abstract void` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#beginObject()()` Consumes the opening delimiter of a JSON object. |
| `abstract void` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#endArray()()` Consumes the closing delimiter of a JSON array. |
| `abstract void` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#endObject()()` Consumes the closing delimiter of a JSON object. |
| `abstract boolean` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#hasNext()()` Returns true if the current object or array has more elements. |
| `abstract boolean` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#nextBoolean()()` Consumes and returns the next boolean value. |
| `abstract double` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#nextDouble()()` Consumes and returns the next double value. |
| `abstract int` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#nextInt()()` Consumes and returns the next int value. |
| `abstract long` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#nextLong()()` Consumes and returns the next long value. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#nextName()()` Consumes and returns the next property name. |
| `abstract void` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#nextNull()()` Consumes the next null token. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#nextString()()` Consumes and returns the next string value. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonToken` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#peek()()` Returns the type of the next token without consuming it. |
| `abstract void` | `https://developer.android.com/reference/androidx/a2ui/model/processor/A2uiJsonReader#skipValue()()` Skips the next value and all its children. |

### Inherited methods

From [java.lang.AutoCloseable](https://developer.android.com/reference/java/lang/AutoCloseable.html) `abstract void` `https://developer.android.com/reference/java/lang/AutoCloseable.html#close()()`

## Public methods

### beginArray

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract void beginArray()
```

Consumes the opening delimiter of a JSON array.

### beginObject

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract void beginObject()
```

Consumes the opening delimiter of a JSON object.

### endArray

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract void endArray()
```

Consumes the closing delimiter of a JSON array.

### endObject

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract void endObject()
```

Consumes the closing delimiter of a JSON object.

### hasNext

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract boolean hasNext()
```

Returns true if the current object or array has more elements.

### nextBoolean

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract boolean nextBoolean()
```

Consumes and returns the next boolean value.

### nextDouble

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract double nextDouble()
```

Consumes and returns the next double value.

### nextInt

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract int nextInt()
```

Consumes and returns the next int value.

### nextLong

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract long nextLong()
```

Consumes and returns the next long value.

### nextName

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract @NonNull String nextName()
```

Consumes and returns the next property name.

### nextNull

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract void nextNull()
```

Consumes the next null token.

### nextString

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract @NonNull String nextString()
```

Consumes and returns the next string value.

### peek

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract @NonNull A2uiJsonToken peek()
```

Returns the type of the next token without consuming it.

### skipValue

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
abstract void skipValue()
```

Skips the next value and all its children.