Module : lang.value

Version : 1.0.0

Module Overview

This module provides lang library operations common to all values defined by the language specification 2020R1.

Functions

clone

Returns a clone of v.

cloneReadOnly

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

cloneWithType

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

ensureType
fromBalString

Parses and evaluates a subset of Ballerina expression syntax.

fromJsonDecimalString

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

fromJsonFloatString

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

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 v is read-only, i.e.

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 v in JSON format.

toString

Performs a direct conversion of a value to a string.