Release 3.0 of the Serializer is now here. This release contains some key customization enhancements. You now have very fine grained control over the serialization/deserialization process. I'll blog more about this in some later posts.
I also fixed some localization issues plaguing those users outside the U.S. Dates and numbers now use the InvariantCulture to ensure consistent serialization/deserialization regardless of locale. Thanks guys for pointing those out!
Enjoy!
Sunday, January 25, 2009
Subscribe to:
Post Comments (Atom)
2 comments:
How does one mark up the property of a c# class to get a result like:
{“markers”: [{“point”:new GLatLng(53.478093,2.116116)]
The "new GLatLng" is driving me batty trying to figure out.
- P
Do you specifically want the "new GLatLng" in there? 3.0 doesn't do that anymore since it's not very JSON compliant. The new way would render it as:
{"markers": [{"point": {"Lat":53.478093,"Lng":2.116116}]}.
You can get that with this:
public struct GLatLng {
public GLatLng(double Lat, double Lng) {
}
[ConstructorParameter("Lat")]
public double Lat {
get { /* ... */ }
}
[ConstructorParameter("Lng")] public double Lng {
get { /* ... */ }
}
}
Sorry to break that on you if you were expecting the old way. Maybe I can put an option in there to render it the old way if you need it?
Post a Comment