json/tree: add as_chars accessor
This commit is contained in:
parent
b01635141f
commit
6e81437b93
@ -265,6 +265,13 @@ json::tree::node::as_uint (void) const
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
const char*
|
||||
json::tree::node::as_chars (void) const
|
||||
{
|
||||
return as_string ().native ().c_str ();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Global operatoers
|
||||
|
||||
|
@ -66,6 +66,7 @@ namespace json { namespace tree {
|
||||
virtual float as_float (void) const;
|
||||
virtual double as_double (void) const;
|
||||
virtual size_t as_uint (void) const;
|
||||
virtual const char* as_chars (void) const;
|
||||
|
||||
virtual bool is_object (void) const { return false; }
|
||||
virtual bool is_array (void) const { return false; }
|
||||
|
Loading…
Reference in New Issue
Block a user