9 Aug 2011 18:48
Re: Magritte -> Json
Philippe Marschall <philippe.marschall <at> gmail.com>
2011-08-09 16:48:32 GMT
2011-08-09 16:48:32 GMT
2011/8/9 Nick Ager <nick.ager <at> gmail.com>: > Hi Philippe, > >> There is Magritte-Json in [1]. It gives you more control, you can >> override the name of a property and choose not to serialize certain >> objects. I found this necessary when implementing certain predefined >> APIs. It's a bit more "magritty" in the sense that is uses reader and >> writer objects. Though it could certainly be improved on. You can find >> examples in [2]. >> >> [1] http://source.lukas-renggli.ch/magritteaddons >> [2] http://www.squeaksource.com/orion > > It looks good and more comprehensive than my effort. > It appears that objects have to be derived from MJObject in order to use the > Json conversion. Without being certain I don't think so. It should work with any class that has the same methods. > Would there be a problem moving the #javascriptOn: method > from MJObject to an extension method on GRObject to allow more objects to > gain the Json conversion functionality? (I choose GRObject as WAObject, > PRObject & MAObject are all ultimately derived from GRObject). No. > The difference between #asJavascript (with it's > accompanying #javascriptOn:), asJson (with it's accompanying #jsonOn:)? It > appears that even though #asJavascript and #asJson have largely the same(Continue reading)
RSS Feed