U
    ‹Ha,  ã                   @   s|   zd dl mZ W n  ek
r0   d dlmZ Y nX zd dlZW n ek
rZ   d dlZY nX d dlZdZdd„ Zdd„ Z	dS )é    )ÚMutableMappingNZ__geo_interface__c                 C   s
   t | tƒS )zÍ
    Checks if the object is an instance of MutableMapping.

    :param obj: Object to be checked.
    :return: Truth value of whether the object is an instance of
    MutableMapping.
    :rtype: bool
    )Ú
isinstancer   )Úobj© r   ú3/tmp/pip-unpacked-wheel-kunv6awc/geojson/mapping.pyÚ
is_mapping   s    	r   c                 C   sH   t | td ƒ}|d k	r|S t| ƒr$| S t| tjƒr8t| ƒS t t 	| ¡¡S )N)
ÚgetattrÚGEO_INTERFACE_MARKERr   r   ÚgeojsonZGeoJSONÚdictÚjsonÚloadsÚdumps)r   Úmappingr   r   r   Ú
to_mapping   s    r   )
Úcollections.abcr   ÚImportErrorÚcollectionsZ
simplejsonr   r
   r	   r   r   r   r   r   r   Ú<module>   s   