Table of Contents

TTMSMCPValueHelper.ToJSON Method

Converts the value into the JSON representation described by the given result type. An empty value converts to JSON null, and a value that already holds a JSON value is returned unchanged.

API unit family: TMS.MCP.Helpers Declaring type: TTMSMCPValueHelper

Syntax

function ToJSON(const ResultType: TTMSMCPToolPropertyType): TJSONValue;

Parameters

Name Description
ResultType The declared return type of the tool; it selects the JSON form that is produced.

Returns

A newly created JSON value owned by the caller, except when the value already held a JSON value, in which case that same instance is returned.