diff --git a/fastjsonschema/draft04.py b/fastjsonschema/draft04.py
index 01cc07e..6c50a21 100644
--- a/fastjsonschema/draft04.py
+++ b/fastjsonschema/draft04.py
@@ -11,7 +11,7 @@ JSON_TYPE_TO_PYTHON_TYPE = {
     'number': 'int, float',
     'integer': 'int',
     'string': 'str',
-    'array': 'list',
+    'array': 'list, tuple',
     'object': 'dict',
 }
 
diff --git a/fastjsonschema/generator.py b/fastjsonschema/generator.py
index fc5b4b1..17cebd6 100644
--- a/fastjsonschema/generator.py
+++ b/fastjsonschema/generator.py
@@ -281,7 +281,7 @@ class CodeGenerator:
         if variable_name in self._variables:
             return
         self._variables.add(variable_name)
-        self.l('{variable}_is_list = isinstance({variable}, list)')
+        self.l('{variable}_is_list = isinstance({variable}, (list, tuple))')
 
     def create_variable_is_dict(self):
         """

Support for validating tuples as arrays?
Would a PR be accepted that modified fastjsonschema to validate a `tuple` object as an array?  Possible as an optional behavior?

The array validation function here https://github.com/horejsek/python-fastjsonschema/blob/master/fastjsonschema/generator.py#L275 only accepts a list, and I have a situation where I have data structures coming in from httpapi endpoints and custom RPC endpoints; and the RPC endpoints have all their array objects deserialized as tuples; so currently i'm having to wrap the fastjsonschema callable objects with a function that will recursively list-ify all values I pass in for validation.

This is similar to https://github.com/Julian/jsonschema/issues/148
diff --git a/tests/test_array.py b/tests/test_array.py
index 33f6a06..3d77435 100644
--- a/tests/test_array.py
+++ b/tests/test_array.py
@@ -134,3 +134,35 @@ def test_different_items_without_additional_items(asserter, value, expected):
         ],
         'additionalItems': False,
     }, value, expected)
+
+
+@pytest.mark.parametrize('value, expected', [
+    ((), ()),
+    (('a',), ('a',)),
+    (('a', 'b'), ('a', 'b')),
+    (('a', 'b', 3), JsonSchemaException('data[2] must be string', value=3, name='data[2]',
+                                        definition={'type': 'string'}, rule='type')),
+])
+def test_tuples_as_arrays(asserter, value, expected):
+    asserter({
+        '$schema': 'http://json-schema.org/draft-06/schema',
+        'type': 'array',
+        'items':
+            {'type': 'string'},
+
+    }, value, expected)
+
+
+@pytest.mark.parametrize('value, expected', [
+    ({'a': [], 'b': ()}, {'a': [], 'b': ()}),
+    ({'a': (1, 2), 'b': (3, 4)}, {'a': (1, 2), 'b': (3, 4)}),
+])
+def test_mixed_arrays(asserter, value, expected):
+    asserter({
+        'type': 'object',
+        'properties': {
+            'a': {'type': 'array'},
+            'b': {'type': 'array'},
+        },
+    }, value, expected)
+
diff --git a/tests/test_integration.py b/tests/test_integration.py
index 5ea2c08..27135f9 100644
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -52,6 +52,10 @@ definition = {
         [9, 'world', [1], {'a': 'a', 'b': 'b', 'd': 'd'}, 42, 3],
         [9, 'world', [1], {'a': 'a', 'b': 'b', 'c': 'abc', 'd': 'd'}, 42, 3],
     ),
+    (
+        (9, 'world', (1,), {'a': 'a', 'b': 'b', 'd': 'd'}, 42, 3),
+        (9, 'world', (1,), {'a': 'a', 'b': 'b', 'c': 'abc', 'd': 'd'}, 42, 3),
+    ),
     (
         [9, 'world', [1], {'a': 'a', 'b': 'b', 'c': 'xy'}, 42, 3],
         [9, 'world', [1], {'a': 'a', 'b': 'b', 'c': 'xy'}, 42, 3],

pip install -e .[devel]
parse_log_pytest
pytest
pytest pytest-benchmark
git submodule init git submodule update
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
astroid==2.15.8
attrs @ file:///croot/attrs_1668696182826/work
certifi @ file:///croot/certifi_1671487769961/work/certifi
colorama==0.4.6
dill==0.3.7
execnet==2.0.2
-e git+https://github.com/horejsek/python-fastjsonschema.git@e845f622d6340703342a58318d94a295d86bbfaf#egg=fastjsonschema
flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work
importlib-resources==5.12.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
isort==5.11.5
json-spec==0.10.1
jsonschema==4.17.3
lazy-object-proxy==1.9.0
mccabe==0.7.0
packaging @ file:///croot/packaging_1671697413597/work
pkgutil_resolve_name==1.3.10
platformdirs==4.0.0
pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
py-cpuinfo==9.0.0
pylint==2.17.7
pyrsistent==0.19.3
pytest==7.1.2
pytest-benchmark==4.0.0
pytest-cache==1.0
six==1.17.0
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
tomlkit==0.12.5
typed-ast==1.5.5
typing_extensions==4.7.1
validictory==1.1.3
wrapt==1.16.0
zipp @ file:///croot/zipp_1672387121353/work

name: python-fastjsonschema
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=22.1.0=py37h06a4308_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - flit-core=3.6.0=pyhd3eb1b0_0
  - importlib-metadata=4.11.3=py37h06a4308_0
  - importlib_metadata=4.11.3=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=22.0=py37h06a4308_0
  - pip=22.3.1=py37h06a4308_0
  - pluggy=1.0.0=py37h06a4308_1
  - py=1.11.0=pyhd3eb1b0_0
  - pytest=7.1.2=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py37h06a4308_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.11.0=py37h06a4308_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - astroid==2.15.8
      - colorama==0.4.6
      - dill==0.3.7
      - execnet==2.0.2
      - importlib-resources==5.12.0
      - isort==5.11.5
      - json-spec==0.10.1
      - jsonschema==4.17.3
      - lazy-object-proxy==1.9.0
      - mccabe==0.7.0
      - pkgutil-resolve-name==1.3.10
      - platformdirs==4.0.0
      - py-cpuinfo==9.0.0
      - pylint==2.17.7
      - pyrsistent==0.19.3
      - pytest-benchmark==4.0.0
      - pytest-cache==1.0
      - six==1.17.0
      - tomlkit==0.12.5
      - typed-ast==1.5.5
      - typing-extensions==4.7.1
      - validictory==1.1.3
      - wrapt==1.16.0
prefix: /opt/conda/envs/python-fastjsonschema

tests/test_array.py::test_tuples_as_arrays[value0-expected0] tests/test_array.py::test_tuples_as_arrays[value1-expected1] tests/test_array.py::test_tuples_as_arrays[value2-expected2] tests/test_array.py::test_tuples_as_arrays[value3-expected3] tests/test_array.py::test_mixed_arrays[value0-expected0] tests/test_array.py::test_mixed_arrays[value1-expected1] tests/test_integration.py::test_integration[value2-expected2]
tests/test_array.py::test_array[0-expected0] tests/test_array.py::test_array[None-expected1] tests/test_array.py::test_array[True-expected2] tests/test_array.py::test_array[False-expected3] tests/test_array.py::test_array[abc-expected4] tests/test_array.py::test_array[value5-expected5] tests/test_array.py::test_array[value6-expected6] tests/test_array.py::test_array[value7-expected7] tests/test_array.py::test_max_items[value0-expected0] tests/test_array.py::test_max_items[value1-expected1] tests/test_array.py::test_max_items[value2-expected2] tests/test_array.py::test_max_items[value3-expected3] tests/test_array.py::test_min_items[value0-expected0] tests/test_array.py::test_min_items[value1-expected1] tests/test_array.py::test_min_items[value2-expected2] tests/test_array.py::test_min_items[value3-expected3] tests/test_array.py::test_unique_items[value0-expected0] tests/test_array.py::test_unique_items[value1-expected1] tests/test_array.py::test_unique_items[value2-expected2] tests/test_array.py::test_unique_items[value3-expected3] tests/test_array.py::test_min_and_unique_items tests/test_array.py::test_items_all_same[value0-expected0] tests/test_array.py::test_items_all_same[value1-expected1] tests/test_array.py::test_items_all_same[value2-expected2] tests/test_array.py::test_different_items[value0-expected0] tests/test_array.py::test_different_items[value1-expected1] tests/test_array.py::test_different_items[value2-expected2] tests/test_array.py::test_different_items[value3-expected3] tests/test_array.py::test_different_items[value4-expected4] tests/test_array.py::test_different_items[value5-expected5] tests/test_array.py::test_different_items_with_additional_items[value0-expected0] tests/test_array.py::test_different_items_with_additional_items[value1-expected1] tests/test_array.py::test_different_items_with_additional_items[value2-expected2] tests/test_array.py::test_different_items_with_additional_items[value3-expected3] tests/test_array.py::test_different_items_with_additional_items[value4-expected4] tests/test_array.py::test_different_items_with_additional_items[value5-expected5] tests/test_array.py::test_different_items_without_additional_items[value0-expected0] tests/test_array.py::test_different_items_without_additional_items[value1-expected1] tests/test_array.py::test_different_items_without_additional_items[value2-expected2] tests/test_array.py::test_different_items_without_additional_items[value3-expected3] tests/test_array.py::test_different_items_without_additional_items[value4-expected4] tests/test_array.py::test_different_items_without_additional_items[value5-expected5] tests/test_integration.py::test_integration[value0-expected0] tests/test_integration.py::test_integration[value1-expected1] tests/test_integration.py::test_integration[value3-expected3] tests/test_integration.py::test_integration[value4-expected4] tests/test_integration.py::test_integration[value5-expected5] tests/test_integration.py::test_integration[value6-expected6] tests/test_integration.py::test_integration[value7-expected7] tests/test_integration.py::test_integration[value8-expected8] tests/test_integration.py::test_integration[value9-expected9] tests/test_integration.py::test_integration[value10-expected10] tests/test_integration.py::test_integration[value11-expected11] tests/test_integration.py::test_integration[value12-expected12] tests/test_integration.py::test_integration[value13-expected13] tests/test_integration.py::test_any_of_with_patterns
fastjsonschema/draft04.py fastjsonschema/generator.py
fastjsonschema/draft04.py fastjsonschema/generator.py