docs: def save_json(obj, outfile, allow_nan=True, compression=False):
      """Save an ssbio object as a JSON file using json_tricks"""
      if compression:
          with open(outfile, 'wb') as f:
              dump(obj, f, allow_nan=allow_nan, compression=compression)
      else:
          with open(outfile, 'w') as f:
              dump(obj, f, allow_nan=allow_nan, compression=compression)
      log.info('Saved {} (id: {}) to {}'.format(type(obj), obj.id, outfile))