code: def get_json_or_yaml(file_path, content):
      
      if os.path.splitext(file_path)[1] == ".json":
          return json.dumps(content, sort_keys=False, indent=4, separators=(',', ': '))
      else:
          return inginious.common.custom_yaml.dump(content)
docs: Generate JSON or YAML depending on the file extension.