ObjectToDictionary implementation