HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/output/__pycache__/dson.cpython-310.pyc
o

�N�g7�@sNdZddlZzddlZWneydZYnwe�e�Zdd�Zdd�ZdS)aA
Display return data in DSON format
==================================

This outputter is intended for demonstration purposes. Information on the DSON
spec can be found `here`__.

.. __: http://vpzomtrrfrt.github.io/DSON/

This outputter requires `Dogeon`__ (installable via pip)

.. __: https://github.com/soasme/dogeon
�NcCstdurdSdS)N)Fz*The dogeon Python package is not installedT)�dson�rr�D/opt/saltstack/salt/lib/python3.10/site-packages/salt/output/dson.py�__virtual__src
Ks�z6dtd�}dtvr-t�d�}d}|dkrd}d}nt|t�r%|dkr%d}||d	<||d
<tj|fi|��WStyW}zt�	d�t�dt
|�d
��WYd}~Sd}~wtyftjddd�Ynwt�i�S)z'
    Print the output data in JSON
    �)�indent�defaultZ
output_indentFZprettyTrNr�	sort_keysz"Unable to serialize output to dsonz"Unable to serialize output to DSON)�error�messagez'An error occurred while outputting DSON)�exc_info)
�reprZ__opts__�get�
isinstance�intr�dumps�UnicodeDecodeError�logr
�str�	TypeError�debug)�data�kwargsZ	dump_optsrr	�excrrr�output s0



���
r)	�__doc__�loggingr�ImportError�	getLogger�__name__rrrrrrr�<module>s�