/ Published in: Python
                    
                                        I have not tried this out yet, but I hope it can convert IronPython types to and from json.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 Jayrock supports export and importing value types (structs). Below is an example in an interactive IronPython session where Jayrock is being used to export and import System.Drawing.Point (struct) to and from JSON: IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.3053 Type "help", "copyright", "credits" or "license" for more information. >>> import clr >>> clr.AddReference('Jayrock.Json') >>> from Jayrock.Json.Conversion import JsonConvert >>> clr.AddReference('System.Drawing') >>> from System.Drawing import Point >>> print JsonConvert.ExportToString(Point(12,34)) {"x":12,"y":34} >>> print JsonConvert.Import(Point, '{x:12,y:34}') {X=12,Y=34}
URL: http://code.google.com/p/jayrock/issues/detail?id=13
Comments
                    Subscribe to comments
                
                