HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/renderers/__pycache__/json5.cpython-310.pyc
o

;j�@sXdZddlZzddlZdZWneydZYnwe�e�ZdZ	dd�Z
dd
d�ZdS)
a
JSON5 Renderer for Salt

.. versionadded:: 2016.3.0

JSON5 is an unofficial extension to JSON. See http://json5.org/ for more
information.

This renderer requires the `json5 python bindings`__, installable via pip.

.. __: https://pypi.python.org/pypi/json5
�NTF�json5cCstsdStS)N)Fzjson5 module not installed)�	HAS_JSON5�__virtualname__�rr�H/opt/saltstack/salt/lib/python3.10/site-packages/salt/renderers/json5.py�__virtual__sr�base�cKsHt|t�s	|��}|�d�r||�d�dd�}|��siSt�|�S)z�
    Accepts JSON as a string or as a file object and runs it through the JSON
    parser.

    :rtype: A Python data structure
    z#!�
�N)�
isinstance�str�read�
startswith�find�strip�json�loads)Z	json_dataZsaltenvZsls�kwsrrr�render$s


r)rr	)�__doc__�loggingrrr�ImportError�	getLogger�__name__�logrrrrrrr�<module>s
�