
    LKi                         S SK Jr  S SKJrJrJrJrJr  S SKJ	r	  S SK
r
\" SSS9r " S S	\\   5      r " S
 S\\   5      rg)    )abstractmethod)AnyDictGenericProtocolTypeVar)SelfNTT)	covariantc                       \ rS rSrSrS\4S jr\S\S\4S j5       r	S\
\\4   4S jr\S\
\\4   S\4S	 j5       rS
rg)JSONSerializable	   z>A generic interface for objects that can be serialized to JSONreturnc                     g)Serializes the object to JSONN selfs    P/var/www/html/dynamic-report/venv/lib/python3.13/site-packages/chromadb/serde.pyto_json_strJSONSerializable.to_json_str           json_strc                     gz!Deserializes the object from JSONNr   )clsr   s     r   from_json_strJSONSerializable.from_json_str        	r   c                     g)5Serializes the object to a JSON compatible dictionaryNr   r   s    r   to_jsonJSONSerializable.to_json   r   r   json_mapc                     gr   r   r   r%   s     r   	from_jsonJSONSerializable.from_json   r    r   r   N)__name__
__module____qualname____firstlineno____doc__strr   classmethodr	   r   r   r   r#   r(   __static_attributes__r   r   r   r   r   	   sq    HS  S T  c3h  c3h D  r   r   c                       \ rS rSrSrS\4S jrS\\\4   4S jr	\
S\4S j5       r\\
S\\\4   S\4S j5       5       rS	rg
)BaseModelJSONSerializable   zCA mixin for BaseModels that allows a class to be serialized to JSONr   c                 "    U R                  5       $ )r   )model_dump_jsonr   s    r   r   %BaseModelJSONSerializable.to_json_str"   s    ##%%r   c                 J    [         R                  " U R                  5       5      $ )r"   )jsonloadsr6   r   s    r   r#   !BaseModelJSONSerializable.to_json&   s    zz$..011r   c                     g)zDAbstract method that should be implemented to dump the model to JSONNr   r   s    r   r6   )BaseModelJSONSerializable.model_dump_json*   s     	r   r%   c                     gr   r   r'   s     r   r(   #BaseModelJSONSerializable.from_json/   s     	r   r   N)r*   r+   r,   r-   r.   r/   r   r   r   r#   r   r6   r0   r
   r(   r1   r   r   r   r3   r3      sr    M&S &2c3h 2    c3h A   r   r3   )abcr   typingr   r   r   r   r   typing_extensionsr	   r9   r
   r   r3   r   r   r   <module>rC      s@     8 8 " C4 x{ ,
 r   