ballerina/lang.value1.0.0

Module Overview

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

Functions

[16]

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

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 `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.

Types

[4]

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.