Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

JSONParser and JSONGenerator enhancements – PB Docs 2021 – PowerBuilder Library

JSONParser and JSONGenerator enhancements – PB Docs 2021

JSONParser and JSONGenerator enhancements

In order to support

  1. getting and setting an item by path, and

  2. handling special values such as JsonNaN (invalid number),
    JsonPositiveInfinity (positive infinity), and JsonNegativeInfinity
    (negative infinity),

JSONParser
object
has added or improved the following functions:

  • New GetNumberType function —
    Determines the value type of a number item: JsonNumber, JsonNaN,
    JsonPositiveInfinity, or JsonNegativeInfinity.

  • The following functions have been enhanced to support
    JsonNaN, JsonPositiveInfinity, and JsonNegativeInfinity:

    • LoadString supports to load a string which contains
      JsonNaN/JsonPositiveInfinity/JsonNegativeInfinity value

    • LoadFile supports to load a file which contains
      JsonNaN/JsonPositiveInfinity/JsonNegativeInfinity value

    • GetItemObjectJSONString and GetItemArrayJSONString
      support the returned object or array which contains
      JsonNaN/JsonPositiveInfinity/JsonNegativeInfinity value

    • GetItemNumber supports to get value which is
      JsonNaN/JsonPositiveInfinity/JsonNegativeInfinity

  • New GetItemByPath function —
    Gets the item handle according to the path.

  • New ContainsPath function —
    Checks if a path exists.

  • New GetItemObjectJSONString and
    GetItemArrayJSONString
    functions — Gets the string value (in JSON format) of the object
    item or array item.

  • The following functions have been enhanced to get items by
    path: GetChildCount, GetChildKey, GetChildItem, GetItemArray,
    GetItemBlob, GetItemBoolean, GetItemDate, GetItemDateTime,
    GetItemNumber, GetItemObject, GetItemString, GetItemTime,
    GetItemType, and ContainsKey.

JSONGenerator object has added
or improved the following functions:

  • New ImportFile and ImportString functions —
    Imports a JSON item from a JSON string or file.

  • New GetItemByPath and GetPathByItem functions —
    Gets item handle by path or gets path by item handle.

  • The following functions have been enhanced to support
    JsonNaN, JsonPositiveInfinity, and JsonNegativeInfinity:

    • AddItemNumber, ImportFile and ImportString support the
      parameter which contains
      JsonNaN/JsonPositiveInfinity/JsonNegativeInfinity value

    • GetJSONString supports the returned value which contains
      JsonNaN/JsonPositiveInfinity/JsonNegativeInfinity value

  • The following functions have been enhanced to add items by
    path: AddItemArray, AddItemBlob, AddItemBoolean, AddItemDate,
    AddItemDateTime, AddItemNull, AddItemNumber, AddItemObject,
    AddItemString, and AddItemTime.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x