On Fri, May 24, 2013 at 08:57:54AM +0200, Arne Goedeke wrote: > >the main thing i am concerned about is to be able to convert arbitrary > >datastructures to json without throwing an error or needing an expensive > >walk through the datastructure to weed out bad values. > > Yes, I see your point. However, I dont think that walk through is > necessarily more expensive than calling some pike function for each > element. Clearly, that depends on ratio of 'good' to 'bad' data, but I > dont think having it would be a huge win, anyway.
one problem with the walkthough before passing things to the JSON.encode() is that it involves modifying the datastructure, and this may not always be possible without a full deep copy. when that involves objects this may be difficult or not even possible. greetings, martin.
