
    Mh                    F    d Z ddlmZ ddlZddlmZ eZdd	Z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                L    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   kwargss     Q/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/zmq/utils/jsonapi.pyr   r      s*    
 :a""6""))&111    sbytes | strdict | list | str | int | floatc                z    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   s     r   r   r      s?    
 !U HHV:a""6"""r   r   r   )r   r   r   r   )r   r   r   r   )
__doc__
__future__r   r
   typingr   jsonmodr   r   __all__ r   r   <module>r      s}     # " " " " "        2 2 2 2# # # # G
r   