Ë
    èlÖi¨
  ã                   ó6   — d dl Z d dlmZ d dlmZ edd„«       Zy)é    N)ÚOrderedDict)ÚDecimalc           	      óÎ  — ddl m} |�|rt        d«      ‚d}		 |r�g }
t        |d«      r8|D ]2  }|
j	                  t        j                  |ft        t        dœ|¤Ž«       Œ4 n¥t        ||¬«      }d}	|D ]2  }|
j	                  t        j                  |ft        t        dœ|¤Ž«       Œ4 n^t        |d«      r"t        j                  |ft        t        dœ|¤Ž}
n0t        ||¬«      }d}	t        j                  |ft        t        dœ|¤Ž}
t        |
t        «      r|st        d	«      ‚|
|   }
|	rj                  «        	 |j                  |
||¬
«      S # |	rj                  «        w w xY w)aw  
    Create a new table from a JSON file.

    Once the JSON has been deseralized, the resulting Python object is
    passed to :meth:`.Table.from_object`.

    If the file contains a top-level dictionary you may specify what
    property contains the row list using the :code:`key` parameter.

    :code:`kwargs` will be passed through to :meth:`json.load`.

    :param path:
        Filepath or file-like object from which to read JSON data.
    :param row_names:
        See the :meth:`.Table.__init__`.
    :param key:
        The key of the top-level dictionary that contains a list of row
        arrays.
    :param newline:
        If `True` then the file will be parsed as "newline-delimited JSON".
    :param column_types:
        See :meth:`.Table.__init__`.
    :param encoding:
        According to RFC4627, JSON text shall be encoded in Unicode; the default encoding is
        UTF-8. You can override this by using any encoding supported by your Python's open() function
        if :code:`path` is a filepath. If passing in a file handle, it is assumed you have already opened it with the
        correct encoding specified.
    r   )ÚTablez.key and newline may not be specified together.FÚread)Úobject_pairs_hookÚparse_float)ÚencodingTz]When converting a JSON document with a top-level dictionary element, a key must be specified.)Ú	row_namesÚcolumn_types)Úagate.tabler   Ú
ValueErrorÚhasattrÚappendÚjsonÚloadsr   r   ÚopenÚloadÚ
isinstanceÚdictÚ	TypeErrorÚcloseÚfrom_object)ÚclsÚpathr   ÚkeyÚnewliner   r
   Úkwargsr   r   ÚjsÚlineÚfs                úZ/var/www/html/strategist-ai/venv_dbt/lib/python3.12/site-packages/agate/table/from_json.pyÚ	from_jsonr#      sh  € õ< "à
€™7ÜÐIÓJÐJà€Eð ÙØˆBä�t˜VÔ$Ø ò n�DØ—I‘IœdŸj™j¨ÐlÄÔZaÑlÐekÑlÕmñnô ˜¨Ô1�Ø�àò n�DØ—I‘IœdŸj™j¨ÐlÄÔZaÑlÐekÑlÕmñnô �t˜VÔ$Ü—Y‘Y˜tÐb´{ÔPWÑbÐ[aÑb‘ä˜¨Ô1�Ø�ä—Y‘Y˜qÐ_´KÌWÑ_ÐX^Ñ_�ä�bœ$ÔÙÜØsóð ð �C‘ˆBñ Ø�G‰G�Ià×Ñ˜R¨9À<ÐÓPÐPøñ Ø�G‰G�Ið ús   ™DE ÅE$)NNFNzutf-8)r   Úcollectionsr   Údecimalr   Úclassmethodr#   © ó    r"   ú<module>r)      s&   ðÛ Ý #Ý ð òFQó ñFQr(   