Raw-functions

Raw-values are uninterpreted bytes. They are enclosed within `ticks`, e.g. `<p>this is a raw-value</p>`. Raw-values are often returned by integration-components, and they can be transformed into JSON-values for easier handling.

raw:fromBase64($options <Object>) <Raw>

raw:fromBase64() converts the input-String that is encoded as Base64 into Raw-value. Raw-value can be integrated with the components into other systems.

Accepts optional $options -object, which has "encoder" field with the supported values: "basic" or "urlsafe", and "padding" -field (Boolean) to add the padding character '=' at the end of result.

Example

raw:toString() <String>

raw:toString converts the Raw-value into Operon's internal representation of String-value.

Example

raw:toBase64($options <Object>) <String>

raw:toBase64 converts input-Raw value into String-value that is Base64 encoded.

Accepts optional $options -object, which has "encoder" field with the supported values: "basic" or "urlsafe", and "padding" -field (Boolean) to add the padding character '=' at the end of result.

Example

raw:toJson() <JSON>

raw:toJson converts input-Raw that represents a JSON-value into Operon's internal representation of JSON-value. This can be used e.g. to convert the component output into Operon-JSON.

Example

raw:evaluate() <ANY>

raw:evaluate evaluates the input-value expr as Operon-expression and outputs the resulting value.

Example

raw:toStream() <Stream>

raw:toStream converts the input-Raw value into Stream-value. This can be used when a component requires the input as a Stream-value.

Example

raw:replaceFirst($search, $replace) <Stream>

raw:replaceFirst replaces the first encountered $search -value with value given in $replace.

Example

raw:replaceAll($search, $replace) <Stream>

raw:replaceAll replaces all the encountered $search -values with value given in $replace.

Example