Forking simplejson

Chris Rebert clp2 at rebertia.com
Thu Oct 27 10:07:12 EDT 2011


On Thu, Oct 27, 2011 at 6:55 AM, Amirouche Boubekki
<amirouche.boubekki at gmail.com> wrote:
>
>>> +-------------------+---------------+
>>> | Python protocol | JSON |
>>> | or special case | |
>>> +===================+===============+
>>> | (ø) __json__ | see (ø) |
>>> +-------------------+---------------|
>>>      | map               | object        |
>>
>> I am curious what you mean by the 'map' protocol.
>
> I mean dictionnary-like objects

How do you propose to detect such objects? isinstance(x, collections.Mapping) ?

Cheers,
Chris



More information about the Python-list mailing list