def _is_sqlite_json1_enabled():
    'Check if SQLite implementation includes JSON1 extension.'
    con = sqlite3.connect(':memory:')
    try:
        con.execute("SELECT json_valid('123')")
    except sqlite3.OperationalError:
        return False
    finally:
        con.close()
    return True
Check if SQLite implementation includes JSON1 extension.
def _is_sqlite_json1_enabled():
    
    con = sqlite3.connect(':memory:')
    try:
        con.execute("SELECT json_valid('123')")
    except sqlite3.OperationalError:
        return False
    finally:
        con.close()
    return True