mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 11:06:50 +01:00
#3237: An error in the documentation for Poco/JSON/Parser.h
This commit is contained in:
@@ -35,9 +35,9 @@ namespace JSON {
|
|||||||
|
|
||||||
class JSON_API Parser: private ParserImpl
|
class JSON_API Parser: private ParserImpl
|
||||||
/// A parser for reading RFC 4627 compliant JSON from strings or streams.
|
/// A parser for reading RFC 4627 compliant JSON from strings or streams.
|
||||||
///
|
///
|
||||||
/// Simple usage example:
|
/// Simple usage example:
|
||||||
///
|
///
|
||||||
/// std::string json = "{ \"name\" : \"Franky\", \"children\" : [ \"Jonas\", \"Ellen\" ] }";
|
/// std::string json = "{ \"name\" : \"Franky\", \"children\" : [ \"Jonas\", \"Ellen\" ] }";
|
||||||
/// Parser parser;
|
/// Parser parser;
|
||||||
/// Var result = parser.parse(json);
|
/// Var result = parser.parse(json);
|
||||||
@@ -54,13 +54,13 @@ class JSON_API Parser: private ParserImpl
|
|||||||
/// containing a Poco::SharedPtr to an Object or Array instance.
|
/// containing a Poco::SharedPtr to an Object or Array instance.
|
||||||
///
|
///
|
||||||
/// Example:
|
/// Example:
|
||||||
///
|
///
|
||||||
/// std::string json = "{ \"name\" : \"Franky\", \"children\" : [ \"Jonas\", \"Ellen\" ] }";
|
/// std::string json = "{ \"name\" : \"Franky\", \"children\" : [ \"Jonas\", \"Ellen\" ] }";
|
||||||
/// Parser parser;
|
/// Parser parser;
|
||||||
/// Var result = parser.parse(json);
|
/// Var result = parser.parse(json);
|
||||||
/// Object::Ptr object = result.extract<Object::Ptr>();
|
/// Object::Ptr pObject = result.extract<Object::Ptr>();
|
||||||
/// std::string name = object.getValue<std::string>("name");
|
/// std::string name = pObject->getValue<std::string>("name");
|
||||||
/// Array::Ptr children = object.getArray("children");
|
/// Array::Ptr pChildren = pObject->getArray("children");
|
||||||
/// ----
|
/// ----
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -81,9 +81,9 @@ public:
|
|||||||
/// Returns true if comments are allowed, false otherwise.
|
/// Returns true if comments are allowed, false otherwise.
|
||||||
///
|
///
|
||||||
/// By default, comments are not allowed.
|
/// By default, comments are not allowed.
|
||||||
|
|
||||||
void setAllowNullByte(bool nullByte);
|
void setAllowNullByte(bool nullByte);
|
||||||
/// Allow or disallow null byte in strings.
|
/// Allow or disallow null byte in strings.
|
||||||
///
|
///
|
||||||
/// By default, null byte is allowed.
|
/// By default, null byte is allowed.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user