Announcement

Collapse
No announcement yet.

json comparison

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • json comparison

    Hi,
    im using beyond compare Version 4.3.3 (build 24545) and trying two compare two jsons using the sorted and tidy file formats.
    and get conversion errro, is there any things i need to install to use this format.
    what can cause such error?

  • #2
    Are you using Beyond Compare on Windows, Linux, or Mac?

    The sorted and tidied JSON file formats use the jq JSON processor (https://stedolan.github.io/jq/) to format JSON before comparison. A conversion error might indicate jq can't be executed, or it might indicate the JSON files are malformed.
    Chris K Scooter Software

    Comment


    • #3
      im using on linux
      do i need to install jq JSON processor seperetly after installing beyond compare?

      Comment


      • #4
        Hello,

        No, jq is included in the download. If you re-download the additional file format from our website, on the Additional Downloads page, select Linux, and then search JSON, and check all 3 JSON formats. Then launch BC4 and use the Tools menu -> Import wizard and import the .bcpkg download, which should install both the formats and helper files into your .config/bcompare/helpers directory (including jq and jq64)

        http://www.scootersoftware.com/downl..._moreformatsv4

        I would suggest also testing with some very simple json files. Any syntax error in the originals would also cause a conversion error, even if the format is installed correctly.
        Aaron P Scooter Software

        Comment


        • #5
          Aaron,

          I think there maybe a legitimate issue here. I have not been able to get this to work on Windows - even with the simplest of JSON files.

          First off - I am not sure JSON_sorted.bat is a valid batch file. For example, AFAIK, "then" is not a valid keyword:

          Code:
          if "%PROCESSOR_ARCHITECTURE%"=="AMD64" then (
          Helpers\Json\jq64.exe -S . < %1 > %2
          ) else (
          Helpers\Json\jq.exe -S . < %1 > %2
          )

          Comment


          • #6
            Hello,

            Testing on Windows, and I'm not having any issues translating a simple JSON test file (sorted or tidied variants). I did find an issue with the Mac conversion, which you can convert to get it working and we'll look into updating the download.

            Conversion utilities are often picky, and if there are any syntax errors in the file, it could stumble into them. If you use the command line (exterior of BC4) to perform the conversion by providing the full Command Line, does it report any errors or warnings?
            If you try with a very simple JSON Example, is it able to convert it?
            Aaron P Scooter Software

            Comment

            Working...
            X