AsJson

Navigation:  NxLib API > C# Interface / CLI > NxLibItem >

AsJson

Previous pageReturn to chapter overviewNext page

Try to read this tree item and return its JSON representation.

Signatures

Variants throwing exceptions on API errors:

String AsJson()

String AsJson(bool prettyPrint)

String AsJson(bool prettyPrint, int numberPrecision)

String AsJson(bool prettyPrint, int numberPrecision, bool scientificNumberFormat)

Variants returning API errors as int parameter:

String AsJson(Out int returnCode, bool prettyPrint, int numberPrecision, bool scientificNumberFormat)

Parameters

returnCode

The error code returned when accessing the item.

prettyPrint

When true the JSON string will be formatted with line breaks and tabs

numberPrecision

Specifies the accuracy of numbers.

scientificNumberFormat

Specifies if the scientific exponential notation should be used.

Return Value

The item value as JSON string if the item exists. This might also be an entire subtree in JSON representation!