def compare_JSON(json1, json2, raise_error=False):
    """! @brief Will compare two JSON strings, and return False if they differ. An
    extra argument can be used to force the function to raise an error with the line
    the difference was observed.
    """
    for linenumber, (line1, line2) in enumerate(zip(json1.splitlines(),
        json2.splitlines())):
        if line1 != line2:
            if raise_error:
                raise Exception('JSON differs at line: ' + str(linenumber))
            return False
    return True
