o
    ªZh  ã                   @  sH   d Z ddlmZ ddlZddlmZ eZdd	d
„Zddd„Zd
dgZ	dS )a  JSON serialize to/from utf8 bytes

.. versionchanged:: 22.2
    Remove optional imports of different JSON implementations.
    Now that we require recent Python, unconditionally use the standard library.
    Custom JSON libraries can be used via custom serialization functions.
é    )ÚannotationsN)ÚAnyÚor   ÚreturnÚbytesc                 K  s   t j| fi |¤Ž d¡S )znSerialize object to JSON bytes (utf-8).

    Keyword arguments are passed along to :py:func:`json.dumps`.
    Úutf8)ÚjsonÚdumpsÚencode)r   Úkwargs© r   úH/var/www/html/lang_env/lib/python3.10/site-packages/zmq/utils/jsonapi.pyr	      s   r	   Úsúbytes | strúdict | list | str | int | floatc                 K  s&   t | tƒr
|  d¡} tj| fi |¤ŽS )zkLoad object from JSON bytes (utf-8).

    Keyword arguments are passed along to :py:func:`json.loads`.
    r   )Ú
isinstancer   Údecoder   Úloads)r   r   r   r   r   r      s   

r   )r   r   r   r   )r   r   r   r   )
Ú__doc__Ú
__future__r   r   Útypingr   Zjsonmodr	   r   Ú__all__r   r   r   r   Ú<module>   s    



