# flask 3.1.3 (BSD-3-Clause), harvested by tools/harvest_corpus.py
=== input
Serialize data as JSON and write to a file.

    If :data:`~flask.current_app` is available, it will use its
    :meth:`app.json.dump() <flask.json.provider.JSONProvider.dump>`
    method, otherwise it will use :func:`json.dump`.

    :param obj: The data to serialize.
    :param fp: A file opened for writing text. Should use the UTF-8
        encoding to be valid JSON.
    :param kwargs: Arguments passed to the ``dump`` implementation.

    .. versionchanged:: 2.3
        The ``app`` parameter was removed.

    .. versionchanged:: 2.2
        Calls ``current_app.json.dump``, allowing an app to override
        the behavior.

    .. versionchanged:: 2.0
        Writing to a binary file, and the ``encoding`` argument, will be
        removed in Flask 2.1.
    
=== parse rest
short_description: 'Serialize data as JSON and write to a file.'
long_description: |
  If :data:`~flask.current_app` is available, it will use its
  :meth:`app.json.dump() <flask.json.provider.JSONProvider.dump>`
  method, otherwise it will use :func:`json.dump`.
  
  .. versionchanged:: 2.3
      The ``app`` parameter was removed.
  
  .. versionchanged:: 2.2
      Calls ``current_app.json.dump``, allowing an app to override
      the behavior.
  
  .. versionchanged:: 2.0
      Writing to a binary file, and the ``encoding`` argument, will be
      removed in Flask 2.1.
blank_after_short_description: True
blank_after_long_description: True
style: rest
- DocstringParam
  description: 'The data to serialize.'
  kind: param
  key: 'param'
  arg_name: 'obj'
  is_optional: False
- DocstringParam
  description: |
    A file opened for writing text. Should use the UTF-8
    encoding to be valid JSON.
  kind: param
  key: 'param'
  arg_name: 'fp'
  is_optional: False
- DocstringParam
  description: 'Arguments passed to the ``dump`` implementation.'
  kind: param
  key: 'param'
  arg_name: 'kwargs'
  is_optional: False
=== detect
rest
=== compose rest
Serialize data as JSON and write to a file.

If :data:`~flask.current_app` is available, it will use its
:meth:`app.json.dump() <flask.json.provider.JSONProvider.dump>`
method, otherwise it will use :func:`json.dump`.

.. versionchanged:: 2.3
    The ``app`` parameter was removed.

.. versionchanged:: 2.2
    Calls ``current_app.json.dump``, allowing an app to override
    the behavior.

.. versionchanged:: 2.0
    Writing to a binary file, and the ``encoding`` argument, will be
    removed in Flask 2.1.

:param obj: The data to serialize.
:param fp: A file opened for writing text. Should use the UTF-8
    encoding to be valid JSON.
:param kwargs: Arguments passed to the ``dump`` implementation.
