Convert from JSON to map.
| 161 | |
| 162 | // Convert from JSON to map. |
| 163 | foreachpair ( |
| 164 | const string& key, |
| 165 | const JSON::Value& value, |
| 166 | json->values) { |
| 167 | if (!value.is<JSON::String>()) { |
| 168 | EXIT(EXIT_FAILURE) << flags.usage( |
| 169 | "Value of key '" + key + "' in --task_environment is not a string"); |
| 170 | } |
| 171 | |
| 172 | // Save the parsed and validated key/value. |
| 173 | taskEnvironment[key] = value.as<JSON::String>().value; |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | Option<mesos::internal::ContainerDNSInfo> defaultContainerDNS; |