serialization: serialize objects differently, depending on the user agent (fat client vs browser)
fixes #1