I need to serialize the headers object to store it in string format, probably base64.
The Dictionary<String, Object> will only have String or Int values, so there should be no problem.
Dictionary<String, Object> headers = RequestHeaders.ProcessHeaders(HttpContext.Current);
Also, of course the point is to be able to deserialize the base64 string back to Dictionary.
You can’t serialize a
Dictionaryinto XML, but you could serialize it into JSON:To deserialize: