Table of Contents

GetDuration Procedure

Codeunit JSON Functions

Reads the value at Path and returns the value as Duration. An error will be thrown if the value doesn't exist.

Overloads

Name Description
GetDuration(JsonObject; Text): Duration Reads the value at Path and returns the value as Duration.
GetDuration(JsonObject; Text; Boolean): Duration Reads the value at Path and returns the value as Duration.

GetDuration(JsonObject; Text) Procedure

Reads the value at Path and returns the value as Duration. An error will be thrown if the value doesn't exist.

Signature

GetDuration(JsonObj: JsonObject; Path: Text) : Duration

Parameters

JsonObj JsonObject

The JsonObject to read from.

Path Text

The JSONPath expression that will be used to get the requested value.

Returns

Duration

The value found at Path as Duration.

GetDuration(JsonObject; Text; Boolean) Procedure

Reads the value at Path and returns the value as Duration.

Signature

GetDuration(JsonObj: JsonObject; Path: Text; DefaultIfUndefined: Boolean) : Duration

Parameters

JsonObj JsonObject

The JsonObject to read from.

Path Text

The JSONPath expression that will be used to get the requested value.

DefaultIfUndefined Boolean

If true an error is not thrown if the value doesn't exist. Instead a blank Duration is returned. If false an error is thrown if the value doesn't exist.

Returns

Duration

The value found at Path as Duration.

This documentation is generated from Smart Toolbox v27.1