# A2uiCoreDataModel

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

*** ** * ** ***


```
public interface A2uiCoreDataModel extends AutoCloseable
```

<br />

*** ** * ** ***

A storage interface for the JSON data tree.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/a2ui/engine/platform/A2uiCoreDataModel#close()()` Cleans up resources (e.g., clearing registries to prevent memory leaks). |
| `abstract https://developer.android.com/reference/java/lang/Object.html` | `https://developer.android.com/reference/androidx/a2ui/engine/platform/A2uiCoreDataModel#get(androidx.a2ui.model.protocol.A2uiDataPath)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiDataPath path)` Retrieves the value at the given absolute path. |
| `abstract void` | `https://developer.android.com/reference/androidx/a2ui/engine/platform/A2uiCoreDataModel#update(androidx.a2ui.model.protocol.A2uiDataPath,kotlin.Any)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiDataPath path, https://developer.android.com/reference/java/lang/Object.html value)` Replaces the value at the given absolute path. |

## Public methods

### close

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

```
abstract void close()
```

Cleans up resources (e.g., clearing registries to prevent memory leaks).

### get

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

```
abstract Object get(@NonNull A2uiDataPath path)
```

Retrieves the value at the given absolute path.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiDataPath path` | The absolute JSON pointer path to the data point to retrieve. |

| Returns |
|---|---|
| `https://developer.android.com/reference/java/lang/Object.html` | The value stored at the given path, or `null` if the path does not exist or has no value. The returned type will correspond to a standard JSON data type: `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html`, `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-number/index.html`, `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html`, `null`, `Map<String, Any?>` (for JSON objects), or `List<Any?>` (for JSON arrays). |

### update

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

```
abstract void update(@NonNull A2uiDataPath path, Object value)
```

Replaces the value at the given absolute path.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/a2ui/model/protocol/A2uiDataPath path` | The absolute JSON pointer path to the data point to update. |
| `https://developer.android.com/reference/java/lang/Object.html value` | The new value to store at the given path. The type must correspond to a standard JSON data type: `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html`, `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-number/index.html`, `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html`, `null`, `Map<String, Any?>` (for JSON objects), or `List<Any?>` (for JSON arrays). |