Solve some bugs on serialzing and parsing

Serializing and parsing Datetime.
Parsing generic Map.