Servicestack.net custom XML DateTime serialization -


is there way override xml datetime serialization in servicestack.net can json:

jsconfig<datetime>.serializefn = date => new datetime(date.ticks, datetimekind.local).tostring("dd.mm.yyyy hh:mm:ss"); 

i want same thing xml datetimes.

edit:

i found out can hook xml serialization this:

this.contenttypefilters.register("application/xml", serializexmltostream, deserializexmlfromstream);   public static void serializexmltostream(irequestcontext requestcontext, object response, stream stream) {     using (var sw = new streamwriter(stream))     {          sw.write(response.toxml());     } } 

this returns same xml without hook. if has idea how can change serialiazation of datetime custom format or other global way please let me know.


Comments

Popular posts from this blog

tcpdump - How to check if server received packet (acknowledged) -