Unplanned
Last Updated: 16 May 2025 23:19 by Eric
Jos
Created on: 15 May 2025 09:33
Type: Bug Report
0
Inspector > JSON is not showing complete request body

Dear support-reader,

I ran into an issue with the JSON-view of a request-body.

Inspector > Raw is showing alle headers and the complete body as a string, that pretty-printed looks like this:

{
    "Header": {
        "Name": "MyName",
        "Id": 1234
    },
    "Item": {
        "Number": 1,
        "Material": "Wood"
    },
    "Item": {
        "Number": 2,
        "Material": "Gold"
    },
    "Item": {
        "Number": 3,
        "Material": "Plastic"
    }
}

When switching to the JSON tab of the Inspectors-tab, the JSON-view showed, contains only the header and first Item (second and third one are missing)

Is this a bug in the Inspector JSON-view or due to the duplicate Item-keys?

Thanks for your consideration.
Regards J.

3 comments
Eric
Posted on: 16 May 2025 23:19

You can simply copy/paste the data from the OP's report into Fiddler with Edit > Paste as Sessions.

And yes, the problem is caused by the duplicate item keys; JSON objects are JavaScript objects, and if you redefine a key, it overwrites the original value.

E.g. use your browser DevTools to see:

> var b = `{ "first": 1, "first":2 }`; JSON.parse(b);

< {first: 2}

If you want to reuse names like that, you need to use a JavaScript array [] rather than object {}.
Jos
Posted on: 15 May 2025 12:04

Hi Nick,

Thank you for your reply: The issue can be reproduced by using the composer and do a post to whatever url with the above requestbody, select that request on the leftside of the window and look at the Inspectors JSON tab. Please find attached two screenshots.

Hope this helps.

Regards J.

ADMIN
Nick Iliev
Posted on: 15 May 2025 11:16

Hey Jos,

 

 

If possible, please share a SAZ archive (or a public API endpoint) that contains a sample session we can use to reproduce the issue.

 

As a side note, the Fiddler Classic application is no longer in active development, so you might try using the Fiddler Everywhere application, which utilizes modern inspector tools based on the Monaco editor. 

https://www.telerik.com/download/fiddler-everywhere 

 

Regards,
Nick Iliev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.