Héllo,
I did it, it wasn't that difficult actually.
the source is available @ https://github.com/amirouche/jsonir
there is example :
https://github.com/amirouche/jsonir/blob/master/example.py
What makes the implementation of __json__ awkward is the iterencode support
of simplejson that I kept.
I've found that in a lot of cases getting a patch submitted is only
half about good engineering. The other half is politics. I like one
of those things, I don't like the other, and I don't want to take time
out of my coding schedule to write something if in the end a reviewer
shoots down my patch
On 10/28/2011 1:20 PM, Nathan Rice wrote:
Just a random note, I actually set about the task of re-implementing a
json encoder which can be subclassed, is highly extensible, and uses
(mostly) sane coding techniques (those of you who've looked at
simplejson's code will know why this is a good thing
Just a random note, I actually set about the task of re-implementing a
json encoder which can be subclassed, is highly extensible, and uses
(mostly) sane coding techniques (those of you who've looked at
simplejson's code will know why this is a good thing). So far
preliminary tests show the json o
2011/10/27 Chris Rebert
> On Wed, Oct 26, 2011 at 2:14 AM, Amirouche Boubekki
> wrote:
> > Héllo,
> >
> > I would like to fork simplejson [1] and implement serialization rules
> based
> > on protocols instead of types [2], plus special cases for protocol free
> > objects, that breaks compatibili
On Wed, Oct 26, 2011 at 2:14 AM, Amirouche Boubekki
wrote:
> Héllo,
>
> I would like to fork simplejson [1] and implement serialization rules based
> on protocols instead of types [2], plus special cases for protocol free
> objects, that breaks compatibility. The benefit will be a better API for
>
On Thu, Oct 27, 2011 at 6:55 AM, Amirouche Boubekki
wrote:
>
>>> +---+---+
>>> | Python protocol | JSON |
>>> | or special case | |
>>> +===+===+
>>> | (ø) __json__ | see (ø) |
>>> +---+---|
>>> | map
> +---+---+
>> | Python protocol | JSON |
>> | or special case | |
>> +===+=**==+
>> | (ø) __json__ | see (ø) |
>> +---+-**--|
>> | map | object|
>>
>
> I am curious what you mean by the '
Am 26.10.2011 19:34, schrieb Nathan Rice:
Since this happily went off to the wrong recipient the first time...
The python json module/simpljson are badly in need of an architecture
update. The fact that you can't override the encode method of
JSONEncoder and have it work reliably without monkey
On 10/26/2011 5:14 AM, Amirouche Boubekki wrote:
Héllo,
I would like to fork simplejson [1] and implement serialization rules
based on protocols instead of types [2], plus special cases for protocol
free objects, that breaks compatibility. The benefit will be a better
API for json serialization
Since this happily went off to the wrong recipient the first time...
The python json module/simpljson are badly in need of an architecture
update. The fact that you can't override the encode method of
JSONEncoder and have it work reliably without monkey patching the pure
python encoder is a sign
11 matches
Mail list logo