j/tree: remove ambiguous string parse call

single pointer string parsing can be confused with filesystem paths.
instead prefer the two pointer range form.
This commit is contained in:
Danny Robson 2015-09-08 14:32:48 +10:00
parent 701e76c381
commit e6b15d2a85
2 changed files with 0 additions and 7 deletions

View File

@ -181,12 +181,6 @@ json::tree::parse (const std::string &path)
{ return parse (path.c_str (), path.c_str () + path.size ()); } { return parse (path.c_str (), path.c_str () + path.size ()); }
//-----------------------------------------------------------------------------
std::unique_ptr<json::tree::node>
json::tree::parse (const char *start)
{ return parse (start, start + strlen (start)); }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void
json::tree::write (const json::tree::node &node, std::ostream &os) json::tree::write (const json::tree::node &node, std::ostream &os)

View File

@ -42,7 +42,6 @@ namespace json { namespace tree {
/// Parse an encoded form of JSON into a tree structure /// Parse an encoded form of JSON into a tree structure
extern std::unique_ptr<node> parse (const boost::filesystem::path &path); extern std::unique_ptr<node> parse (const boost::filesystem::path &path);
extern std::unique_ptr<node> parse (const char *start, const char *stop); extern std::unique_ptr<node> parse (const char *start, const char *stop);
extern std::unique_ptr<node> parse (const char *start);
extern std::unique_ptr<node> parse (const std::string&); extern std::unique_ptr<node> parse (const std::string&);
extern void write (const json::tree::node&, std::ostream&); extern void write (const json::tree::node&, std::ostream&);