Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3/4TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

DataFlex Examples

Web API Categories

ASN.1
Amazon Glacier
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Service Bus
Base64
Bounced Email
Box
CAdES
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
ECC
Email Object
Encryption
FTP
FileAccess
Firebase
GMail REST API
Geolocation
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
Gzip
HTML-to-XML/Text

HTTP
HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
REST
REST Misc
RSA Encryption
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Socket/SSL/TLS
Spider
Stream
Tar Archive
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl

 

 

 

(DataFlex) Akeneo: Get List of Products (using StringBuilder)

Using a previously obtained request token, demonstrates how to get a list of products using a Chilkat StringBuilder. Using the StringBuilder is convenient because it prevents returning a potentially large string. Instead, the result is deposited into the StringBuilder object.

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Variant vSbJson
    Handle hoSbJson
    Boolean iSuccess
    Handle hoJson
    String sV_linksSelfHref
    String sV_linksFirstHref
    Integer iCurrent_page
    Integer i
    Integer iCount_i
    String sIdentifier
    String sFamily
    String sParent
    Boolean iEnabled
    String sCreated
    String sUpdated
    Integer j
    Integer iCount_j
    String sStrVal
    String sLocale
    String sScope
    Boolean iData
    String sData_str
    String sV_linksDownloadHref
    Integer iData_int
    String sDataAmount
    String sDataUnit
    String sTemp1

    // This example requires the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    // Use your previously obtained access token.
    // See Get Akeneo Access Token
    Set ComAuthToken Of hoHttp To "access_token"

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbJson
    If (Not(IsComObjectCreated(hoSbJson))) Begin
        Send CreateComObject of hoSbJson
    End
    Get pvComObject of hoSbJson to vSbJson
    Get ComQuickGetSb Of hoHttp "http://pim.my-akeneo-site.com/api/rest/v1/products" vSbJson To iSuccess
    If (iSuccess <> True) Begin
        Get ComLastHeader Of hoHttp To sTemp1
        Showln sTemp1
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    // A sample response looks like this.
    // See below for sample code to parse the JSON response..

    // {
    //   "_links": {
    //     "self": {
    //       "href": "https://demo.akeneo.com/api/rest/v1/products?page=3&limit=3"
    //     },
    //     "first": {
    //       "href": "https://demo.akeneo.com/api/rest/v1/products?page=1&limit=3"
    //     },
    //     "previous": {
    //       "href": "https://demo.akeneo.com/api/rest/v1/products?page=2&limit=3"
    //     },
    //     "next": {
    //       "href": "https://demo.akeneo.com/api/rest/v1/products?page=4&limit=3"
    //     }
    //   },
    //   "current_page": 3,
    //   "_embedded": {
    //     "_items": [
    //       {
    //         "_links": {
    //           "self": {
    //             "href": "https://demo.akeneo.com/api/rest/v1/product/top"
    //           }
    //         },
    //         "identifier": "top",
    //         "family": "tshirt",
    //         "groups": [],
    //         "parent": null,
    //         "categories": [
    //           "summer_collection"
    //         ],
    //         "enabled": true,
    //         "values": {
    //           "name": [
    //             {
    //               "data": "Top",
    //               "locale": "en_US",
    //               "scope": null
    //             },
    //             {
    //               "data": "Dbardeur",
    //               "locale": "fr_FR",
    //               "scope": null
    //             }
    //           ],
    //           "description": [
    //             {
    //               "data": "Summer top",
    //               "locale": "en_US",
    //               "scope": "ecommerce"
    //             },
    //             {
    //               "data": "Top",
    //               "locale": "en_US",
    //               "scope": "tablet"
    //             },
    //             {
    //               "data": "Dbardeur pour l't",
    //               "locale": "fr_FR",
    //               "scope": "ecommerce"
    //             },
    //             {
    //               "data": "Dbardeur",
    //               "locale": "fr_FR",
    //               "scope": "tablet"
    //             }
    //           ],
    //           "price": [
    //             {
    //               "locale": null,
    //               "scope": null,
    //               "data": [
    //                 {
    //                   "amount": "15.5",
    //                   "currency": "EUR"
    //                 },
    //                 {
    //                   "amount": "15",
    //                   "currency": "USD"
    //                 }
    //               ]
    //             }
    //           ],
    //           "color": [
    //             {
    //               "locale": null,
    //               "scope": null,
    //               "data": "black"
    //             }
    //           ],
    //           "size": [
    //             {
    //               "locale": null,
    //               "scope": null,
    //               "data": "m"
    //             }
    //           ]
    //         },
    //         "created": "2016-06-23T18:24:44+02:00",
    //         "updated": "2016-06-25T17:56:12+02:00",
    //         "associations": {
    //           "PACK": {
    //             "products": [
    //               "sunglasses"
    //             ],
    //             "groups": []
    //           }
    //         }
    //       },
    //       {
    //         "_links": {
    //           "self": {
    //             "href": "https://demo.akeneo.com/api/rest/v1/product/cap"
    //           }
    //         },
    //         "identifier": "cap",
    //         "family": "caps",
    //         "groups": [],
    //         "parent": null,
    //         "categories": [
    //           "summer_collection"
    //         ],
    //         "enabled": true,
    //         "values": {
    //           "name": [
    //             {
    //               "data": "Cap",
    //               "locale": "en_US",
    //               "scope": null
    //             },
    //             {
    //               "data": "Casquette",
    //               "locale": "fr_FR",
    //               "scope": null
    //             }
    //           ],
    //           "description": [
    //             {
    //               "data": "Cap unisex",
    //               "locale": "en_US",
    //               "scope": "ecommerce"
    //             },
    //             {
    //               "data": "Cap unisex",
    //               "locale": "en_US",
    //               "scope": "tablet"
    //             },
    //             {
    //               "data": "Casquette unisexe",
    //               "locale": "fr_FR",
    //               "scope": "ecommerce"
    //             },
    //             {
    //               "data": "Casquette unisexe",
    //               "locale": "fr_FR",
    //               "scope": "tablet"
    //             }
    //           ],
    //           "price": [
    //             {
    //               "locale": null,
    //               "scope": null,
    //               "data": [
    //                 {
    //                   "amount": "20",
    //                   "currency": "EUR"
    //                 },
    //                 {
    //                   "amount": "20",
    //                   "currency": "USD"
    //                 }
    //               ]
    //             }
    //           ],
    //           "color": [
    //             {
    //               "locale": null,
    //               "scope": null,
    //               "data": "black"
    //             }
    //           ]
    //         },
    //         "created": "2016-06-23T18:24:44+02:00",
    //         "updated": "2016-06-25T17:56:12+02:00",
    //         "associations": {
    //           "PACK": {
    //             "products": [
    //               "sunglasses"
    //             ],
    //             "groups": []
    //           }
    //         }
    //       },
    //       {
    //         "_links": {
    //           "self": {
    //             "href": "https://demo.akeneo.com/api/rest/v1/product/sweat"
    //           }
    //         },
    //         "identifier": "sweat",
    //         "family": null,
    //         "groups": [],
    //         "parent": null,
    //         "categories": [
    //           "winter_collection"
    //         ],
    //         "enabled": true,
    //         "values": {},
    //         "created": "2016-06-23T11:24:44+02:00",
    //         "updated": "2016-06-23T11:24:44+02:00",
    //         "associations": {}
    //       }
    //     ]
    //   }
    // }
    // 

    Get Create (RefClass(cComChilkatJsonObject)) To hoJson
    If (Not(IsComObjectCreated(hoJson))) Begin
        Send CreateComObject of hoJson
    End
    Get pvComObject of hoSbJson to vSbJson
    Get ComLoadSb Of hoJson vSbJson To iSuccess

    Get ComStringOf Of hoJson "_links.self.href" To sV_linksSelfHref
    Get ComStringOf Of hoJson "_links.first.href" To sV_linksFirstHref
    Get ComIntOf Of hoJson "current_page" To iCurrent_page
    Move 0 To i
    Get ComSizeOfArray Of hoJson "_embedded.items" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJson To i
        Get ComStringOf Of hoJson "_embedded.items[i]._links.self.href" To sV_linksSelfHref
        Get ComStringOf Of hoJson "_embedded.items[i].identifier" To sIdentifier
        Get ComStringOf Of hoJson "_embedded.items[i].family" To sFamily
        Get ComStringOf Of hoJson "_embedded.items[i].parent" To sParent
        Get ComBoolOf Of hoJson "_embedded.items[i].enabled" To iEnabled
        Get ComStringOf Of hoJson "_embedded.items[i].created" To sCreated
        Get ComStringOf Of hoJson "_embedded.items[i].updated" To sUpdated
        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].groups" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].groups[j]" To sStrVal
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].categories" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].categories[j]" To sStrVal
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.blocked" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.blocked[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.blocked[j].scope" To sScope
            Get ComBoolOf Of hoJson "_embedded.items[i].values.blocked[j].data" To iData
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.can_cut" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.can_cut[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.can_cut[j].scope" To sScope
            Get ComBoolOf Of hoJson "_embedded.items[i].values.can_cut[j].data" To iData
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.not_used" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.not_used[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.not_used[j].scope" To sScope
            Get ComBoolOf Of hoJson "_embedded.items[i].values.not_used[j].data" To iData
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.deny_delivery" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.deny_delivery[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.deny_delivery[j].scope" To sScope
            Get ComBoolOf Of hoJson "_embedded.items[i].values.deny_delivery[j].data" To iData
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.can_split_package" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.can_split_package[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.can_split_package[j].scope" To sScope
            Get ComBoolOf Of hoJson "_embedded.items[i].values.can_split_package[j].data" To iData
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.transfer_to_warehouse" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.transfer_to_warehouse[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.transfer_to_warehouse[j].scope" To sScope
            Get ComBoolOf Of hoJson "_embedded.items[i].values.transfer_to_warehouse[j].data" To iData
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.product_code" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_code[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_code[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_code[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.nuotrauka" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.nuotrauka[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.nuotrauka[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.nuotrauka[j].data" To sData_str
            Get ComStringOf Of hoJson "_embedded.items[i].values.nuotrauka[j]._links.download.href" To sV_linksDownloadHref
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.minimum_quantity" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.minimum_quantity[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.minimum_quantity[j].scope" To sScope
            Get ComIntOf Of hoJson "_embedded.items[i].values.minimum_quantity[j].data" To iData_int
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.code" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.code[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.code[j].scope" To sScope
            Get ComIntOf Of hoJson "_embedded.items[i].values.code[j].data" To iData_int
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.name" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.name[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.name[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.name[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.fsc_code" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.fsc_code[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.fsc_code[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.fsc_code[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.warehouse" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.warehouse[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.warehouse[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.warehouse[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.item_volume" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.item_volume[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.item_volume[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.item_volume[j].data.amount" To sDataAmount
            Get ComStringOf Of hoJson "_embedded.items[i].values.item_volume[j].data.unit" To sDataUnit
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.customs_code" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.customs_code[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.customs_code[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.customs_code[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.product_type" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_type[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_type[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_type[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.weight_netto" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.weight_netto[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.weight_netto[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.weight_netto[j].data.amount" To sDataAmount
            Get ComStringOf Of hoJson "_embedded.items[i].values.weight_netto[j].data.unit" To sDataUnit
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.supplier_code" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.supplier_code[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.supplier_code[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.supplier_code[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.tariff_number" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.tariff_number[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.tariff_number[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.tariff_number[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.weight_brutto" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.weight_brutto[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.weight_brutto[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.weight_brutto[j].data.amount" To sDataAmount
            Get ComStringOf Of hoJson "_embedded.items[i].values.weight_brutto[j].data.unit" To sDataUnit
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.package_code_1" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_code_1[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_code_1[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_code_1[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.package_code_2" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_code_2[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_code_2[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_code_2[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.package_code_3" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_code_3[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_code_3[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_code_3[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.supplier_number" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.supplier_number[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.supplier_number[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.supplier_number[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.package_volume_1" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_volume_1[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_volume_1[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_volume_1[j].data.amount" To sDataAmount
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_volume_1[j].data.unit" To sDataUnit
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.package_volume_2" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_volume_2[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_volume_2[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_volume_2[j].data.amount" To sDataAmount
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_volume_2[j].data.unit" To sDataUnit
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.package_volume_3" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_volume_3[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_volume_3[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_volume_3[j].data.amount" To sDataAmount
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_volume_3[j].data.unit" To sDataUnit
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.package_weight_1" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_weight_1[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_weight_1[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_weight_1[j].data.amount" To sDataAmount
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_weight_1[j].data.unit" To sDataUnit
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.package_weight_2" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_weight_2[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_weight_2[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_weight_2[j].data.amount" To sDataAmount
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_weight_2[j].data.unit" To sDataUnit
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.package_weight_3" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_weight_3[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_weight_3[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_weight_3[j].data.amount" To sDataAmount
            Get ComStringOf Of hoJson "_embedded.items[i].values.package_weight_3[j].data.unit" To sDataUnit
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.country_of_origin" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.country_of_origin[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.country_of_origin[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.country_of_origin[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.product_group_code" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_group_code[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_group_code[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_group_code[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.base_measurement_unit" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.base_measurement_unit[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.base_measurement_unit[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.base_measurement_unit[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.measurement_unit_code" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.measurement_unit_code[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.measurement_unit_code[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.measurement_unit_code[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.product_category_code" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_category_code[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_category_code[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_category_code[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.sale_measurement_unit" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.sale_measurement_unit[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.sale_measurement_unit[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.sale_measurement_unit[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.country_of_origin_code" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.country_of_origin_code[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.country_of_origin_code[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.country_of_origin_code[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.vat_registration_group" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.vat_registration_group[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.vat_registration_group[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.vat_registration_group[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.critical_amount_of_stock" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.critical_amount_of_stock[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.critical_amount_of_stock[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.critical_amount_of_stock[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.stock_registration_group" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.stock_registration_group[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.stock_registration_group[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.stock_registration_group[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.purchase_measurement_unit" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.purchase_measurement_unit[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.purchase_measurement_unit[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.purchase_measurement_unit[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.product_registration_group" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_registration_group[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_registration_group[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.product_registration_group[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.base_measurement_unit_quantity" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.base_measurement_unit_quantity[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.base_measurement_unit_quantity[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.base_measurement_unit_quantity[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.comment" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.comment[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.comment[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.comment[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.units_in_pallet" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.units_in_pallet[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.units_in_pallet[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.units_in_pallet[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.first_description" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.first_description[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.first_description[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.first_description[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJson "_embedded.items[i].values.second_description" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJson To j
            Get ComStringOf Of hoJson "_embedded.items[i].values.second_description[j].locale" To sLocale
            Get ComStringOf Of hoJson "_embedded.items[i].values.second_description[j].scope" To sScope
            Get ComStringOf Of hoJson "_embedded.items[i].values.second_description[j].data" To sData_str
            Move j + 1 To j
        Loop

        Move i + 1 To i
    Loop

    Showln "Success."


End_Procedure

 

© 2000-2019 Chilkat Software, Inc. All Rights Reserved.