static bool decode_json(const char *name, C& container, void (*cb)(C&, JSONObj *obj), JSONObj *obj, bool mandatory = false);
template<class T>
- static void decode_json(const char *name, T& val, T& default_val, JSONObj *obj);
+ static void decode_json(const char *name, T& val, const T& default_val, JSONObj *obj);
};
template<class T>
}
template<class T>
-void JSONDecoder::decode_json(const char *name, T& val, T& default_val, JSONObj *obj)
+void JSONDecoder::decode_json(const char *name, T& val, const T& default_val, JSONObj *obj)
{
JSONObjIter iter = obj->find_first(name);
if (iter.end()) {
JSONDecoder::decode_json("bucket_index_max_shards", bucket_index_max_shards, obj);
JSONDecoder::decode_json("read_only", read_only, obj);
JSONDecoder::decode_json("tier_type", tier_type, obj);
- JSONDecoder::decode_json("sync_from_all", sync_from_all, obj);
+ JSONDecoder::decode_json("sync_from_all", sync_from_all, true, obj);
JSONDecoder::decode_json("sync_from", sync_from, obj);
}