addStyleImportFromJSON

open override fun addStyleImportFromJSON(importId: String, json: String, config: HashMap<String, Value>?, importPosition: ImportPosition?): Expected<String, None>

Adds new import to current style, loaded from a JSON string.

Return

A string describing an error if the operation was not successful, or empty otherwise.

Parameters

importId

Identifier of import to update.

json

The JSON string to be loaded directly as the import.

config

A map containing the configuration options of the import.

importPosition

The import will be positioned according to the ImportPosition parameters. If not specified, then the import is moved to the top of the import stack.