views:

94

answers:

2

I would like my REST service to return a DateTime as:

  • 01-dec-2009 for Accept-Language: en-US
  • 01-dez-2009 for Accept-Language: pt-BR

Thanks!

André Carlucci

A: 
Jeremy McGee
Hi Jeremy, that's the way, but how to get access to the Accept-Language header in my WebGet method?
andrecarlucci
@andrecarlucci - answer updated.
Jeremy McGee
So the answer is: "there is no way"?
andrecarlucci
@andrecarlucci: try looking at `WebOperationContext.Current.IncomingRequest.Headers` to see the headers for the incoming request.
Jeremy McGee
A: 

I would argue that "serialization" means "converting something to text format for interchange/storage" and not to present to a human reader.

By this definition, it must be language independent, and follow the XML serialization convention, or ISO 8601, or a CultureInfo::InvariantCulture. See also http://www.mihai-nita.net/article.php?artID=20051025a

If we don't call it "serialization" then

Mihai Nita