No announcement yet.

Suggestion: Beautify one liner text files

  • Filter
  • Time
  • Show
Clear All
new posts

  • Suggestion: Beautify one liner text files

    Sometimes I have to work with XML or JSON files, in which they are quite big in file size, and they are generated by some application systems, and I have to do some comparisons to identify some data deltas.

    I was wondering, would like to suggest a feature, if it is possible to implement and also if the public finds it useful.

    -To be able to visually format text file comparison view, when comparing files you know they are one-liners (only have on single line of text, no carriage return and new line chars in them "\r\n"), maybe some toolbar button to "beautify" the text, in the case of JSON files, to have them all pretty-printed with indents and new lines per object's properties

    I know there's the Format toolbar button and with XML you already can do this, but am not sure how could I achieve above with what is currently provided in BC4 for JSON files.

    Appreciate anyone's help

  • #2
    - I'd also like to suggest to add shortcuts or custom format toolbar buttons for quick format change and allow you to place the ones you mostly use, instead of going into format toolbar button, look into the list of pre-formatted file types then click on the preferred type to apply your pre-configured format applied on text files.


    • #3

      The Format toolbar can switch between loaded File Formats. If a format has a defined External Conversion (like XML Tidied), it can execute a program to perform the conversion from one line to many.

      We have an example of defining a custom format here:

      And there is a JSON Sorted (and JSON) format, for download here:

      Since the conversion process is reloading the file and comparison, and would also lose any edits made, switching formats is more destructive than swapping display filters.
      Aaron P Scooter Software


      • #4
        This is great! thank your for your prompt response. The JSON sorted format option did the trick! Just what I need.