This is a migrated thread and some comments may be shown as answers.

Automatically put text on new lines

2 Answers 364 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Gordon
Top achievements
Rank 1
Gordon asked on 31 Oct 2019, 09:09 AM

Hi,

 

When i capture JSON files, (for this particular site) i use EXPORT RAW FILES. 

It seems to capture the text i need, Except that each Json file is just one long long line of text..  i created a php script to extract what i need & make it into multiple lines. (however this is a slow process).

 

Is there a way in Fiddler 4, to identify a special character - EG   curly brace { or }  and make it "save" a new-line after (or before) this character.  So when i view the resulting file, is already in multiple lines...

 

 

2 Answers, 1 is accepted

Sort by
0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 04 Nov 2019, 09:53 PM

Hi Gordon,

I am not entirely certain if you are referring to only the exported files or the views in Fiddler. If in Fiddler, the SyntaxView can format the JSON by selecting it -> right-clicking and choosing Format Script/JSON. Alternatively, for exported files I recommend to opening the file in a Code Editor like, Visual Studio Code which has functionality to format blocks of code. 

Additionally, there is an existing Feature Request for Formatting JSON and have increased its priority by adding a vote for you. I encourage following it to receive status updates.

Please give these workarounds a try and let me know the results. Thank you for using the Fiddler Forums.

Regards,


Eric R | Technical Support Engineer
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Gordon
Top achievements
Rank 1
answered on 05 Nov 2019, 04:21 AM
[quote]Eric R | Technical Support Engineer said:

Hi Gordon,

I am not entirely certain if you are referring to only the exported files or the views in Fiddler. If in Fiddler, the SyntaxView can format the JSON by selecting it -> right-clicking and choosing Format Script/JSON. Alternatively, for exported files I recommend to opening the file in a Code Editor like, Visual Studio Code which has functionality to format blocks of code. [/QUOTE]

Basically, Ive got 130+ json files i want. i put them in a specific directory.

One script (PHP) I have, is getting all the JSON files & extracting the data i want (including in this process is putting blocks of code into new-lines).   THIS script  took 50+ minutes to complete - very long. but I brought it down to 20 minutes.

(133+ JSON files, 4.3MB in size,  shrunk down to one formatted data-file 195KB in size)

 

This saves the information i want into a pre-formatted file. By putting things into new-lines "At source" from Fiddler will save unnecessary processing... (or reduce it to a minute instead of 20-30 mins)

The second PHP script takes 1 second, to review the formatted file and display the data in a presentable format. 

 

[QUOTE]

 

Additionally, there is an existing Feature Request for Formatting JSON and have increased its priority by adding a vote for you. I encourage following it to receive status updates.

Please give these workarounds a try and let me know the results. Thank you for using the Fiddler Forums.

[/quote]

 

I'll checkout the feature-request area. Thanks.

Tags
Fiddler Classic
Asked by
Gordon
Top achievements
Rank 1
Answers by
Eric R | Senior Technical Support Engineer
Telerik team
Gordon
Top achievements
Rank 1
Share this question
or