Re: Forking simplejson

2012-02-10 Thread Amirouche Boubekki
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.

Re: Forking simplejson

2011-10-28 Thread Nathan Rice
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

Re: Forking simplejson

2011-10-28 Thread Terry Reedy
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

Re: Forking simplejson

2011-10-28 Thread Nathan Rice
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

Re: Forking simplejson

2011-10-27 Thread Amirouche Boubekki
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

Re: Forking simplejson

2011-10-27 Thread 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 compatibility. The benefit will be a better API for >

Re: Forking simplejson

2011-10-27 Thread Chris Rebert
On Thu, Oct 27, 2011 at 6:55 AM, Amirouche Boubekki wrote: > >>> +---+---+ >>> | Python protocol | JSON | >>> | or special case | | >>> +===+===+ >>> | (ø) __json__ | see (ø) | >>> +---+---| >>>      | map        

Re: Forking simplejson

2011-10-27 Thread Amirouche Boubekki
> +---+---+ >> | Python protocol | JSON | >> | or special case | | >> +===+=**==+ >> | (ø) __json__ | see (ø) | >> +---+-**--| >> | map | object| >> > > I am curious what you mean by the '

Re: Forking simplejson

2011-10-27 Thread Paul Kölle
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

Re: Forking simplejson

2011-10-26 Thread Terry Reedy
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

Re: Forking simplejson

2011-10-26 Thread 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 patching the pure python encoder is a sign