Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jun 2013
    Location
    Colorado
    Posts
    3

    Default JSON File Format

    I needed a file format for JSON files.

    I wanted to pretty-print & sort my JSON to make comparison easy.

    I have attached my bcpackage with my completed JSON File Format.

    The formatting is done via jq - http://stedolan.github.io/jq/
    Props to Stephen Dolan for the utility https://github.com/stedolan.

    I have sent a message to the folks at Scooter Software asking them to include it in the page with additional formats. http://www.scootersoftware.com/downl...oreformats_win

    If you're interested in seeing it on there, I'm sure a quick reply to the thread with an up-vote would help them see the value posting it.

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,949

    Default

    We definitely see the value, but we need to schedule testing before we can include it in our formats list, and it might be a bit before we can include it. This forum post would allow a more immediate, unofficial support of the format.
    Aaron P Scooter Software

  3. #3
    Join Date
    Dec 2013
    Location
    Wisconsin, USA
    Posts
    2

    Default

    Thank you Jeremy! I just imported this format file into BC4 and it worked great. You saved me a lot of time. I was really surprised that a json format was not already defined, especially since your post is a year and half old.

  4. #4
    Join Date
    May 2009
    Location
    United States
    Posts
    5

    Default

    I was about to create my own.. This saved me a bunch of time also. Thanks!

  5. #5
    Join Date
    Oct 2011
    Posts
    37

    Default

    Yes please. I hope I can figure out how to configure the background app correctly.

    PS: Its in built Awesome.
    Last edited by crashnburn; 13-Aug-2015 at 06:48 AM.

  6. #6
    Join Date
    Sep 2015
    Posts
    3

    Lightbulb

    If anyone is trying to do this in the future, here is what I did to make it more effective at diffing large files that have varying layout. I'd uploaded a new version of the package, but the forum attachment limit is too low to allow it (jq files have gotten bigger)

    1. download this package and rename it by adding a .zip extension
    2. extract the files and locate the json_formatted.bat file in the json subdirectory
    3. change the command line switches for both executables from
      Code:
      jq.exe . < %1 > %2
      to
      Code:
      jq.exe -S . < %1 > %2
      (add the -S switch)
    4. download the latest jq executable from https://stedolan.github.io/jq/download/. I used v 1.5
    5. package it all back up in a zip with BCFileFormats.xml in the root and rename it to JsonFileFormat.bcpkg


    Note that this solution will re-sort the file before diffing, so it will change the structure of the file that you see

  7. #7
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,949

    Default

    Thanks for this update! I've followed these directions and built a sorted JSON to try and test with. If you would like to submit any example files for our testing, you can post here or directly email us at support@scootersoftware.com with a link containing this forum thread for our reference.
    Aaron P Scooter Software

  8. #8
    Join Date
    Sep 2015
    Posts
    3

    Default

    Quote Originally Posted by Aaron View Post
    Thanks for this update! I've followed these directions and built a sorted JSON to try and test with.
    The best test for this is a large, unsorted JSON file because it demonstrates that it can be 'cleaned up' to be compared with another one.

  9. #9
    Join Date
    Jun 2013
    Location
    Colorado
    Posts
    3

    Default

    Great improvement jkewley. Glad to see this has finally gotten the attention of the developers at Scooter and this may be part of the standard distribution.

  10. #10
    Join Date
    Jan 2016
    Posts
    1

    Default

    Indeed! JSON is one format that is essential these days. I was surprised when I learned BC didn't support it out of the box. This is a must have.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •