}
}
+template<class T>
+void decode_json_obj(deque<T>& l, JSONObj *obj)
+{
+ l.clear();
+
+ JSONObjIter iter = obj->find_first();
+
+ for (; !iter.end(); ++iter) {
+ T val;
+ JSONObj *o = *iter;
+ decode_json_obj(val, o);
+ l.push_back(val);
+ }
+}
+
template<class T>
void decode_json_obj(set<T>& l, JSONObj *obj)
{
f->close_section();
}
template<class T>
+static void encode_json(const char *name, const std::deque<T>& l, ceph::Formatter *f)
+{
+ f->open_array_section(name);
+ for (typename std::deque<T>::const_iterator iter = l.begin(); iter != l.end(); ++iter) {
+ encode_json("obj", *iter, f);
+ }
+ f->close_section();
+}template<class T>
static void encode_json(const char *name, const std::set<T>& l, ceph::Formatter *f)
{
f->open_array_section(name);