- char* where = strchr(argv[i], (int)'=');
-
- if (where)
- {
- std::string key(argv[i], (size_t)(where - argv[i]));
- std::string stringValue(where + 1);
-
- std::stringstream stream;
- stream << stringValue << std::endl;
-
- Deserializer deserializer(stream);
-
- try
- {
- SerializablePtr value(deserializer.deserialize());
- map_[key] = value;
- }
- catch (std::exception e)
- {
- // it doesn't deserialize to anything we know, so just store it
- // as a string
- map_[key] = SerializablePtr(new SerializableString(stringValue));
- }
- }