Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Frage zum Rest-Debugger (https://www.delphipraxis.net/205353-frage-zum-rest-debugger.html)

Tom-Tom 31. Aug 2020 16:02

Frage zum Rest-Debugger
 
Hallo,


ich habe eine Frage zum Rest-Debugger. Ich erhalte als Ergebnis eines GET Befehles folgendes JSON


Code:

{
    "id": 4,
    "changed": "2020-08-28T10:45:13+0200",
    "number": "20002",
    "customerId": 2,
    "paymentId": 5,
    "dispatchId": 9,
    "partnerId": "",
    "shopId": 1,
    "invoiceAmount": 7.88,
    "invoiceAmountNet": 6.62,
    "invoiceShipping": 3.9,
    "invoiceShippingNet": 3.28,
    "invoiceShippingTaxRate": "19",
    "orderTime": "2020-08-28T10:45:13+0200",
    "transactionId": "",
    "comment": "",
    "customerComment": "",
    "internalComment": "",
    "net": 0,
    "taxFree": 0,
    "temporaryId": "",
    "referer": "",
    "clearedDate": null,
    "trackingCode": "",
    "languageIso": "1",
    "currency": "EUR",
    "currencyFactor": 1,
    "remoteAddress": "10.10.0.0",
    "deviceType": "desktop",
    "isProportionalCalculation": false,
    "details": [
        {
            "id": 6,
            "orderId": 4,
            "articleId": 13,
            "taxId": 1,
            "taxRate": 19,
            "statusId": 0,
            "articleDetailID": 13,
            "number": "20002",
            "articleNumber": "SW10013",
            "price": 1.99,
            "quantity": 2,
            "articleName": "Hauptartikel mit Bewertungen",
            "shipped": 0,
            "shippedGroup": 0,
            "releaseDate": "-0001-11-30T00:00:00+0100",
            "mode": 0,
            "esdArticle": 0,
            "config": "",
            "ean": "",
            "unit": "Gram",
            "packUnit": "",
            "attribute": {
                "id": 6,
                "orderDetailId": 6,
                "attribute1": "",
                "attribute2": null,
                "attribute3": null,
                "attribute4": null,
                "attribute5": null,
                "attribute6": null
            }
        }
    ],
    "documents": [
    ],
    "payment": {
        "id": 5,
        "name": "prepayment",
        "description": "Prepayment",
        "template": "prepayment.tpl",
        "class": "prepayment.php",
        "table": "",
        "hide": false,
        "additionalDescription": "",
        "debitPercent": 0,
        "surcharge": 0,
        "surchargeString": "",
        "position": 1,
        "active": true,
        "esdActive": false,
        "mobileInactive": false,
        "embedIFrame": "",
        "hideProspect": 0,
        "action": null,
        "pluginId": null,
        "source": null,
        "attribute": null
    },


   usw....
Soweit, so gut. Jetzt ist die Response aber nicht nur in einer "Ebene", sondern ich habe z.B. einen Bereich "details", in dem ich mehrere Detaildaten haben kann.
(typische Master-Detail Beziehung).

Jetzt zu meiner Frage:

Wie muss ich hier das JSON Stammelement angeben, damit ich z.B. nur die "details" erhalte ?

Habe es mit "details" versucht, ernte aber nur "Antwort-Rootelement, "details" ist kein gültiger Pfad für das Antwort json" vom REST-Debugger.

Klammern etc bringen mich auch nicht weiter, daher die Frage in die Expertenrunde...


Vielen Dank für Euren Tipp !

Tom


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:44 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz