json/tree: add from_json that takes a path
This commit is contained in:
parent
63cf40eeca
commit
93277d5d9d
@ -379,4 +379,16 @@ from_json (const json::tree::node &n, Args&&... args)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <typename T, class ...Args>
|
||||
T
|
||||
from_json (const std::experimental::filesystem::path &src, Args &&...args)
|
||||
{
|
||||
return from_json<T> (
|
||||
*json::tree::parse (src),
|
||||
std::forward<Args> (args)...
|
||||
);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user