Automatically put text on new lines

3 posts, 0 answers
  1. Gordon
    Gordon avatar
    5 posts
    Member since:
    Mar 2016

    Posted 31 Oct 2019 Link to this post

    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. Eric R | Technical Support Engineer
    Admin
    Eric R | Technical Support Engineer avatar
    247 posts

    Posted 04 Nov 2019 Link to this post

    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
  3. Gordon
    Gordon avatar
    5 posts
    Member since:
    Mar 2016

    Posted 04 Nov 2019 in reply to Eric R | Technical Support Engineer Link to this post

    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.

     

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

Back to Top