| 46 | |
| 47 | template <typename TType> |
| 48 | static void GetOption(const NJson::TJsonValue& optionsJson, const TString& name, TType* result) { |
| 49 | if (optionsJson.Has(name)) { |
| 50 | TStringBuf value = (optionsJson[name]).GetString(); |
| 51 | const bool isParsed = TryFromString<TType>(value, *result); |
| 52 | Y_ABORT_UNLESS(isParsed, "Couldn't parse option \"%s\" with value = %s", name.data(), value.data()); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | void JsonToDictionaryOptions(const NJson::TJsonValue& optionsJson, TDictionaryOptions* options) { |
| 57 | GetOption(optionsJson, TOKEN_LEVEL_TYPE, &options->TokenLevelType); |
no test coverage detected