String Series::toJson() const { PTree pt; pt.put("id", id); pt.put("key", key); pt.put("name", name); PTree ptags; BOOST_FOREACH(const std::string tag, tags) { PTree t; t.put("", tag); ptags.push_back(std::make_pair("", t)); }