← Back
Editing: jsonapi.cpython-311.pyc
� mc�c� � �| � d Z ddlZddlmZmZmZmZ eZdedefd�Z deee f deeee eef fd�Z d d gZdS )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 �L � t j | fi |��� 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 �3/usr/lib/python3/dist-packages/zmq/utils/jsonapi.pyr r s* � � �:�a�"�"�6�"�"�)�)�&�1�1�1� �sc �z � t | t � � r| � d� � } t j | fi |��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 s r r r s? � � �!�U��� � �H�H�V�����:�a�"�"�6�"�"�"r r r )�__doc__r �typingr r r r �jsonmodr r �str�int�floatr �__all__� r r �<module>r s� ��� � ���� )� )� )� )� )� )� )� )� )� )� )� )� ��2�S� 2�u� 2� 2� 2� 2�#�U�5�#�:� � #�U�4��s�C��3N�-O� #� #� #� #� �G� ���r
Save File
Cancel