import json

import requests


def simple(conf):
    url = conf['url']
    output_format = conf.get('format', 'html')
    response = requests.get(url)
    if output_format == 'json':
        return json.dumps(response.json(), indent=True)
    else:
        return response.text

import json

import requests


def simple(conf):
    url = conf['url']
    output_format = conf.get('format', 'html')
    response = requests.get(url)
    if output_format == 'json':
        return json.dumps(response.json(), indent=True, sort_keys=True)
    else:
        return response.text

Sort keys in JSON fetcher for consistent results
Sort keys in JSON fetcher for consistent results