editorOf

fun editorOf(document: Document, validateSchema: Boolean = true, identity: IdentityGenerator = IdentityGenerator.default, layout: LayoutConfig = LayoutConfig.convenientMobile(), functions: ResolutionResourceBuilder.() -> Unit? = null, onError: ErrorHandler = NoOpErrorHandler, onChange: DocumentEditor.(ChangeEvent) -> Unit? = null): DocumentEditor

Creates a new DocumentEditor for the given document.

Return

A new DocumentEditor for the given document.

Parameters

document

The document to edit (mutations write through to this instance).

validateSchema

When true, validates the document schema on construction.

identity

Identity generator used when creating new items/rows.

layout

Layout/view configuration affecting pagination and visibility.

functions

Optional Wisdom functions available to formulas during evaluation.

onError

Error handler invoked on evaluation/validation errors.

onChange

Optional callback invoked for each change emitted by the editor.


fun editorOf(json: JsonObject, validateSchema: Boolean = true, identity: IdentityGenerator = IdentityGenerator.default, layout: LayoutConfig = LayoutConfig.convenientMobile(), functions: ResolutionResourceBuilder.() -> Unit? = null, onError: ErrorHandler = NoOpErrorHandler, onChange: DocumentEditor.(ChangeEvent) -> Unit? = null): DocumentEditor

Creates a new DocumentEditor for the given json.

Return

A new DocumentEditor for the given json.

Parameters

json

JSON representation of the document to edit.

validateSchema

When true, validates the document schema on construction.

identity

Identity generator used when creating new items/rows.

layout

Layout/view configuration affecting pagination and visibility.

functions

Optional Wisdom functions available to formulas during evaluation.

onError

Error handler invoked on evaluation/validation errors.

onChange

Optional callback invoked for each change emitted by the editor.


fun editorOf(map: MutableMap<String, Any?>, validateSchema: Boolean = true, identity: IdentityGenerator = IdentityGenerator.default, layout: LayoutConfig = LayoutConfig.convenientMobile(), functions: ResolutionResourceBuilder.() -> Unit? = null, onError: ErrorHandler = NoOpErrorHandler, onChange: DocumentEditor.(ChangeEvent) -> Unit? = null): DocumentEditor

Creates a new DocumentEditor from the given map.

Return

A new DocumentEditor for the given map.

Parameters

map

Backing map representing a document to edit.

validateSchema

When true, validates the document schema on construction.

identity

Identity generator used when creating new items/rows.

layout

Layout/view configuration affecting pagination and visibility.

functions

Optional Wisdom functions available to formulas during evaluation.

onError

Error handler invoked on evaluation/validation errors.

onChange

Optional callback invoked for each change emitted by the editor.


fun editorOf(json: String, validateSchema: Boolean = true, identity: IdentityGenerator = IdentityGenerator.default, layout: LayoutConfig = LayoutConfig.convenientMobile(), functions: ResolutionResourceBuilder.() -> Unit? = null, onError: ErrorHandler = NoOpErrorHandler, onChange: DocumentEditor.(ChangeEvent) -> Unit? = null): DocumentEditor

Creates a new DocumentEditor from the given json.

Return

A new DocumentEditor for the given json.

Parameters

json

String-encoded JSON of the document to edit.

validateSchema

When true, validates the document schema on construction.

identity

Identity generator used when creating new items/rows.

layout

Layout/view configuration affecting pagination and visibility.

functions

Optional Wisdom functions available to formulas during evaluation.

onError

Error handler invoked on evaluation/validation errors.

onChange

Optional callback invoked for each change emitted by the editor.


fun editorOf(bytes: ByteArray, validateSchema: Boolean = true, identity: IdentityGenerator = IdentityGenerator.default, layout: LayoutConfig = LayoutConfig.convenientMobile(), functions: ResolutionResourceBuilder.() -> Unit? = null, onError: ErrorHandler = NoOpErrorHandler, onChange: DocumentEditor.(ChangeEvent) -> Unit? = null): DocumentEditor

Creates a new DocumentEditor from raw JSON bytes without decoding them to a String first.

This overload is preferred when the JSON is already available as a ByteArray, as it can avoid materializing the entire document as an intermediate String before parsing. For large documents, this may reduce peak memory usage and allocation overhead.

Parameters

bytes

UTF-8 encoded JSON of the document to edit.