#pragma once #include "json.h" struct Identity{ template T operator()(T t){ return t; } }; template inline js::Value vector_to_json(C const & container, F f = Identity()){ js::Array array; for(auto x : container){ array.push_back(to_json(f(x))); } return array; }