+
    Nj                        ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 ^ RIHt ]P                  '       d   ^ RIHt ^RIHt  ! R R4      tR	 R
 lt ! R R]4      tR# )    )annotationsN)date)	http_date)Response)Appc                  n    ] tR t^tRtR R ltR R ltR R ltR R	 ltR
 R lt	R R lt
R R ltRtR# )JSONProvidera  A standard set of JSON operations for an application. Subclasses
of this can be used to customize JSON behavior or use different
JSON libraries.

To implement a provider for a specific library, subclass this base
class and implement at least :meth:`dumps` and :meth:`loads`. All
other methods have default implementations.

To use a different provider, either subclass ``Flask`` and set
:attr:`~flask.Flask.json_provider_class` to a provider class, or set
:attr:`app.json <flask.Flask.json>` to an instance of the class.

:param app: An application instance. This will be stored as a
    :class:`weakref.proxy` on the :attr:`_app` attribute.

.. versionadded:: 2.2
c                    V ^8  d   QhRRRR/# )   appr   returnNone )formats   "U/data/cameron/venvs/serve_omidlab/lib/python3.14/site-packages/flask/json/provider.py__annotate__JSONProvider.__annotate__&   s     , ,C ,D ,    c                	<    \         P                  ! V4      V n        R # )N)weakrefproxy_app)selfr   s   &&r   __init__JSONProvider.__init__&   s     s+	r   c               $    V ^8  d   QhRRRRRR/# r   objt.Anykwargsr   strr   )r   s   "r   r   r   )   s!     " " "% "C "r   c                    \         h)zySerialize data as JSON.

:param obj: The data to serialize.
:param kwargs: May be passed to the underlying JSON library.
NotImplementedErrorr   r   r    s   &&,r   dumpsJSONProvider.dumps)   
     "!r   c               (    V ^8  d   QhRRRRRRRR/# )r   r   r   fpz	t.IO[str]r    r   r   r   )r   s   "r   r   r   1   s(     , , ,9 , ,$ ,r   c                J    VP                  V P                  ! V3/ VB 4       R# )zSerialize data as JSON and write to a file.

: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: May be passed to the underlying JSON library.
N)writer&   )r   r   r*   r    s   &&&,r   dumpJSONProvider.dump1   s     	C*6*+r   c               $    V ^8  d   QhRRRRRR/# r   szstr | bytesr    r   r   r   )r   s   "r   r   r   ;   s!     " "{ "e " "r   c                    \         h)zwDeserialize data as JSON.

:param s: Text or UTF-8 bytes.
:param kwargs: May be passed to the underlying JSON library.
r#   r   r1   r    s   &&,r   loadsJSONProvider.loads;   r(   r   c               $    V ^8  d   QhRRRRRR/# )r   r*   zt.IO[t.AnyStr]r    r   r   r   )r   s   "r   r   r   C   s!     / /~ / /5 /r   c                D    V P                   ! VP                  4       3/ VB # )zDeserialize data as JSON read from a file.

:param fp: A file opened for reading text or UTF-8 bytes.
:param kwargs: May be passed to the underlying JSON library.
)r4   read)r   r*   r    s   &&,r   loadJSONProvider.loadC   s     zz"'').v..r   c               $    V ^8  d   QhRRRRRR/# )r   argsztuple[t.Any, ...]r    zdict[str, t.Any]r   r   r   )r   s   "r   r   r   K   s$      %/?	r   c                	    V'       d   V'       d   \        R 4      hV'       g   V'       g   R# \        V4      ^8X  d
   V^ ,          # T;'       g    T# )z9app.json.response() takes either args or kwargs, not bothN)	TypeErrorlen)r   r<   r    s   &&&r   _prepare_response_obj"JSONProvider._prepare_response_objK   s=     FWXXFt9>7N~~vr   c               $    V ^8  d   QhRRRRRR/# r   r<   r   r    r   r   r   )r   s   "r   r   r   Y   s&     V Ve Vu V Vr   c                |    V P                  W4      pV P                  P                  V P                  V4      RR7      # )a  Serialize the given arguments as JSON, and return a
:class:`~flask.Response` object with the ``application/json``
mimetype.

The :func:`~flask.json.jsonify` function calls this method for
the current application.

Either positional or keyword arguments can be given, not both.
If no arguments are given, ``None`` is serialized.

:param args: A single value to serialize, or multiple values to
    treat as a list to serialize.
:param kwargs: Treat as a dict to serialize.
application/jsonmimetype)r@   r   response_classr&   )r   r<   r    r   s   &*, r   responseJSONProvider.responseY   s7     ((6yy''

3BT'UUr   )r   N)__name__
__module____qualname____firstlineno____doc__r   r&   r-   r4   r9   r@   rI   __static_attributes__r   r   r   r	   r	      s1    $,","/V Vr   r	   c                    V ^8  d   QhRRRR/# )r   or   r   r   )r   s   "r   r   r   l   s     S S S% Sr   c                   \        V \        4      '       d   \        V 4      # \        V \        P                  \
        P                  34      '       d   \        V 4      # \        '       d3   \        P                  ! V 4      '       d   \        P                  ! V 4      # \        V R 4      '       d   \        V P                  4       4      # \        R\        V 4      P                   R24      h)__html__zObject of type z is not JSON serializable)
isinstancer   r   decimalDecimaluuidUUIDr!   dataclassesis_dataclassasdicthasattrrT   r>   typerK   )rR   s   &r   _defaultr_   l   s    !T|!gootyy1221v{{//22!!!$$q*1::<  
od1g&6&6%77PQ
RRr   c                  ~    ] tR t^|t$ Rt]! ]4      tR]R&    Rt	 Rt
 RtR]R&    Rt R	 R
 ltR R ltR R ltRtR# )DefaultJSONProvidera  Provide JSON operations using Python's built-in :mod:`json`
library. Serializes the following additional data types:

-   :class:`datetime.datetime` and :class:`datetime.date` are
    serialized to :rfc:`822` strings. This is the same as the HTTP
    date format.
-   :class:`uuid.UUID` is serialized to a string.
-   :class:`dataclasses.dataclass` is passed to
    :func:`dataclasses.asdict`.
-   :class:`~markupsafe.Markup` (or any object with a ``__html__``
    method) will call the ``__html__`` method to get a string.
zt.Callable[[t.Any], t.Any]defaultTNzbool | NonecompactrE   c               $    V ^8  d   QhRRRRRR/# r   r   )r   s   "r   r    DefaultJSONProvider.__annotate__   s!     ) ) )% )C )r   c                    VP                  RV P                  4       VP                  RV P                  4       VP                  RV P                  4       \        P
                  ! V3/ VB # )a  Serialize data as JSON to a string.

Keyword arguments are passed to :func:`json.dumps`. Sets some
parameter defaults from the :attr:`default`,
:attr:`ensure_ascii`, and :attr:`sort_keys` attributes.

:param obj: The data to serialize.
:param kwargs: Passed to :func:`json.dumps`.
rb   ensure_ascii	sort_keys)
setdefaultrb   rg   rh   jsonr&   r%   s   &&,r   r&   DefaultJSONProvider.dumps   sV     	)T\\2.$*;*;<+t~~6zz#(((r   c               $    V ^8  d   QhRRRRRR/# r0   r   )r   s   "r   r   re      s!     ' '{ 'e ' 'r   c                0    \         P                  ! V3/ VB # )z~Deserialize data as JSON from a string or bytes.

:param s: Text or UTF-8 bytes.
:param kwargs: Passed to :func:`json.loads`.
)rj   r4   r3   s   &&,r   r4   DefaultJSONProvider.loads   s     zz!&v&&r   c               $    V ^8  d   QhRRRRRR/# rC   r   )r   s   "r   r   re      s!     
 
e 
u 
 
r   c                \   V P                  W4      p/ pV P                  f   V P                  P                  '       g   V P                  RJ d   VP	                  R^4       MVP	                  RR4       V P                  P                  V P                  ! V3/ VB  R2V P                  R7      # )a)  Serialize the given arguments as JSON, and return a
:class:`~flask.Response` object with it. The response mimetype
will be "application/json" and can be changed with
:attr:`mimetype`.

If :attr:`compact` is ``False`` or debug mode is enabled, the
output will be formatted to be easier to read.

Either positional or keyword arguments can be given, not both.
If no arguments are given, ``None`` is serialized.

:param args: A single value to serialize, or multiple values to
    treat as a list to serialize.
:param kwargs: Treat as a dict to serialize.
Findent
separators
rF   ),:)r@   rc   r   debugri   rH   r&   rG   )r   r<   r    r   	dump_argss   &*,  r   rI   DefaultJSONProvider.response   s      ((6&(	LL TYY___9N  1-  z:yy''zz#++,B/$-- ( 
 	
r   r   )rK   rL   rM   rN   rO   staticmethodr_   rb   __annotations__rg   rh   rc   rG   r&   r4   rI   rP   r   r   r   ra   ra   |   se     +7x*@G'@
 L
 I  G[
 "H/)'
 
r   ra   )
__future__r   rZ   rV   rj   typingtrX   r   datetimer   werkzeug.httpr   TYPE_CHECKINGwerkzeug.sansio.responser   
sansio.appr   r	   r_   ra   r   r   r   <module>r      sR    "        #???1 VV VVrS [
, [
r   