File manager - Edit - /usr/lib/python3.6/site-packages/httpie/output/__pycache__/utils.cpython-36.pyc
Back
3 �ga* � @ sj d dl Z d dlZd dlmZ ddlmZ ddlmZ eeee j f d�dd �Z eeeef d�d d�ZdS )� N)�Tuple� )�&load_json_preserve_order_and_dupe_keys� )�PREFIX_REGEX)�data�returnc C s\ ydt | �fS tk r Y nX t| �\}}y|t |�fS tk rV td��Y nX dS )z&Simple JSON loading from `data`. � zInvalid JSONN)r � ValueError�parse_prefixed_json)r �data_prefix�body� r �/usr/lib/python3.6/utils.py�load_prefixed_json s r c C s4 t jt| �}|r|d nd}| t|�d� }||fS )z�Find the potential JSON body from `data`. Sometimes the JSON body is prefixed with a XSSI magic string, specific to the server. Return a tuple (data prefix, actual JSON body). r r N)�re�findallr �len)r Zmatchesr r r r r r s r )Zjsonr Ztypingr Zutilsr Zlexers.jsonr �strZJSONDecoderr r r r r r �<module> s
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings