GetLongchar( ) method (JsonArray)
- Last Updated: January 18, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Gets the JSON string value of one or more elements as a LONGCHAR or LONGCHAR array.
To get the value of other
JSON data types as a string, use the GetJsonText( ) method.
Return type: LONGCHAR
Access: PUBLIC
Applies to: Progress.Json.ObjectModel.JsonArray class
Syntax
|
If code-page is specified,
the returned LONGCHAR will be set to that code-page.
By default, the returned LONGCHAR will be set to -cpinternal.
When this method is called without the count parameter, the value of a single element is returned. Using the count parameter directs the AVM to return an ABL array consisting of count elements.
- index
- An INTEGER identifying the value of the element to be returned. Indexing into JsonArrays is 1-based.
- count
- An INTEGER specifying the number of elements, starting with the element at index, to be returned in the ABL array.
If code-page is
specified, the returned LONGCHAR is set to that code-page. By default,
the returned LONGCHAR is set to -cpinternal. To
get the string value of other JSON data types use the GetJsonText( ) method.
A JsonError is raised if:
-
indexis less than 1, greater than the length of the JsonArray, or is the Unknown value (?) -
count is less than 1 or is the Unknown value (
?) - The sum of index and count is greater than the length of the JsonArray
- Any element is not a JSON String