Custom Web Api Json Converter For A Single Property

23 בSeptember 2014

The web is well documented regarding usage of a custom Json Converter. Basically the idea is to inherit from JsonConvert, explore the current serialized type and use your own custom behavior when serializing. The custom Json Convert can be used explicitly by calling Json.Convert or implicitly by registering in Application_Start. Explicit: Implicit: The implicit registration will serialize every object that contains the specified type (DateTime? in our example) using the MyJsonDateTimeConverter Converter. The explicit usage will only affect the current serialized value. The other case Both technics won't work in the following case; I need the converter to work only on a specified property, but I cannot...
tags: , , ,
no comments

Html In an Email – Embedded Buttons

21 בSeptember 2014

Embedding an html with images as hyper links in an Email. I expected Gmail \ outlook to have a built-in solution for it but apparently that is not the case. As every mail client has its own style of presenting the email content, expect some difficulties. One pain that I had is image spacing – making two image to have no space between them. Here are a few approaches I came up using; Embedding Html Outlook:  attach your html file and choose "Insert as text" instead of "Open". Gmail: I used a chrome extension Particular image areas as links For example, if you have...
tags: ,
no comments