ballerina/lang.value : 0.0.0

Module Overview

The lang.value module provides functions that work on values of more than one basic type.

Functions

[16]

clone

Returns a clone of a value.

cloneReadOnly

Returns a clone of a value that is read-only, i.e., immutable.

cloneWithType

Constructs a value with a specified type by cloning another value.

ensureType

Safely casts a value to a type.

fromBalString

Parses and evaluates a subset of Ballerina expression syntax.

fromJsonDecimalString

Parses a string in JSON format, using decimal to represent numbers.

fromJsonFloatString

Parses a string in JSON format, using float to represent numbers.

fromJsonString

Parses a string in JSON format and returns the the value that it represents.

fromJsonStringWithType

Converts a string in JSON format to a user-specified type.

fromJsonWithType

Converts a value of type json to a user-specified type.

isReadOnly

Tests whether a value is read-only, i.e., immutable.

mergeJson

Merges two json values.

toBalString

Converts a value to a string that describes the value in Ballerina syntax.

toJson

Converts a value of type anydata to json.

toJsonString

Returns the string that represents a anydata value in JSON format.

toString

Performs a direct conversion of a value to a string.

Types

[5]

AnydataType

A type parameter that is a subtype of anydata.

Cloneable

The type of value to which clone and cloneReadOnly can be applied.

CloneableType

A type parameter that is a subtype of Cloneable.

JsonDecimal

Subtype of json that allows only decimal numbers.

JsonFloat

Subtype of json that allows only float numbers.