U
    lufú  ã                   @   sj   d Z ddlZddlmZmZmZmZ eZeedœdd„Z	eee
f eeee
eef 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.
é    N)ÚAnyÚDictÚListÚUnion)ÚoÚreturnc                 K   s   t j| f|Ž 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   ú5/tmp/pip-unpacked-wheel-h6ekxre8/zmq/utils/jsonapi.pyr
      s    r
   )Úsr   c                 K   s"   t | tƒr|  d¡} tj| f|ŽS )zkLoad object from JSON bytes (utf-8).

    Keyword arguments are passed along to :py:func:`json.loads`.
    r   )Ú
isinstanceÚbytesÚdecoder	   Úloads)r   r   r   r   r   r      s    

r   )Ú__doc__r	   Útypingr   r   r   r   Zjsonmodr   r
   ÚstrÚintÚfloatr   Ú__all__r   r   r   r   Ú<module>   s   &
