
    f                    D    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	y)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)Anyc                L    t        j                  | fi |j                  d      S )znSerialize object to JSON bytes (utf-8).

    Keyword arguments are passed along to :py:func:`json.dumps`.
    utf8)jsondumpsencode)okwargss     L/var/www/cvtools/html/venv/lib/python3.12/site-packages/zmq/utils/jsonapi.pyr   r      s#    
 ::a"6"))&11    c                p    t        | t              r| j                  d      } t        j                  | fi |S )zkLoad object from JSON bytes (utf-8).

    Keyword arguments are passed along to :py:func:`json.loads`.
    r   )
isinstancebytesdecoder   loads)sr   s     r   r   r      s0    
 !UHHV::a"6""r   r   r   )r
   r   returnr   )r   zbytes | strr   zdict | list | str | int | float)
__doc__
__future__r   r   typingr   jsonmodr   r   __all__ r   r   <module>r      s2    #   2# G
r   