ReadYAML

MacroModule

genre

Other

author

Jan-Martin Kuhnigk

package

FMEstable/ReleaseMeVis

definition

ReadYAML.def

see also

LoadYAML

keywords

yaml, json, config, string, parse, python, object, edit, edityaml

Purpose

Converts a YAML (https://en.wikipedia.org/wiki/YAML) formatted string into a python object.

Usage

Just write or paste the YAML formatted string into the YAML String field and press update.

Details

Note that an empty string will result as an error as a None object cannot be transmitted as a python object.

Windows

Default Panel

../../../Projects/YAMLSupport/Modules/mhelp/Images/Screenshots/ReadYAML._default.png

Output Fields

outPythonObject

name: outPythonObject, type: MLBase

Python object (string, number, list, dict) representing the YAML input string, or None on error/empty string.

Parameter Fields

Field Index

[]: Trigger

Status Message: String

Clear: Trigger

Update: Trigger

doNotClearOnFailedUpdate: Bool

YAML String: String

Expand environment variables (e.g. ${HOME}) in values: Bool

Has Valid Output: Bool

On Input Change Behavior: Enum

Output Object Datatype: String

Status Code: Enum

Visible Fields

YAML String

name: inString_YAML, type: String

YAML formatted string to construct the python object from.

Expand environment variables (e.g. ${HOME}) in values

name: inExpandEnvironmentVariables, type: Bool, default: FALSE

If enabled, values (not keys!) referencing valid environment variables via $ABC or ${ABC} are expanded.

Output Object Datatype

name: outDatatype, type: String, persistent: no

Datatype of the toplevel python object read.

Update

name: update, type: Trigger

Initiates update of all output field values.

Clear

name: clear, type: Trigger

Clears all output field values to a clean initial state.

On Input Change Behavior

name: onInputChangeBehavior, type: Enum, default: Clear, deprecated name: shouldAutoUpdate,shouldUpdateAutomatically

Declares how the module should react if a value of an input field changes.

Values:

Title

Name

Deprecated Name

​Update

​Update

​TRUE

​Clear

​Clear

​FALSE

[]

name: updateDone, type: Trigger, persistent: no

Notifies that an update was performed (Check status interface fields to identify success or failure).

Has Valid Output

name: hasValidOutput, type: Bool, persistent: no

Indicates validity of output field values (success of computation).

Status Code

name: statusCode, type: Enum, persistent: no

Reflects module’s status (successful or failed computations) as one of some predefined enumeration values.

Values:

Title

Name

​Ok

​Ok

​Invalid input object

​Invalid input object

​Invalid input parameter

​Invalid input parameter

​Internal error

​Internal error

Status Message

name: statusMessage, type: String, persistent: no

Gives additional, detailed information about status code as human-readable message.

Hidden Fields

doNotClearOnFailedUpdate

name: doNotClearOnFailedUpdate, type: Bool, persistent: no

Prevents automated clear after update failed. This does not affect status fields. It enables the developer to analyze module’s state after failure.