Skip to content

Commit ef21fbc

Browse files
committed
doc new behavior
1 parent 25342ba commit ef21fbc

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

include/json/value.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ Json::Value obj_value(Json::objectValue); // {}
226226
Value(UInt64 value);
227227
#endif // if defined(JSON_HAS_INT64)
228228
Value(double value);
229-
Value(const char* value);
230-
Value(const char* beginValue, const char* endValue);
229+
Value(const char* value); ///! Copy til first 0. (NULL causes to seg-fault.)
230+
Value(const char* beginValue, const char* endValue); ///! Copy all, incl zeroes.
231231
/** \brief Constructs a value from a static string.
232232
233233
* Like other value string constructor but do not duplicate the string for
@@ -239,7 +239,7 @@ Json::Value obj_value(Json::objectValue); // {}
239239
* \endcode
240240
*/
241241
Value(const StaticString& value);
242-
Value(const std::string& value);
242+
Value(const std::string& value); ///! Copy data() til size(). Embedded zeroes too.
243243
#ifdef JSON_USE_CPPTL
244244
Value(const CppTL::ConstString& value);
245245
#endif
@@ -266,8 +266,8 @@ Json::Value obj_value(Json::objectValue); // {}
266266
bool operator!=(const Value& other) const;
267267
int compare(const Value& other) const;
268268

269-
const char* asCString() const;
270-
std::string asString() const;
269+
const char* asCString() const; ///! Embedded zeroes could cause you trouble!
270+
std::string asString() const; ///! Embedded zeroes are possible.
271271
#ifdef JSON_USE_CPPTL
272272
CppTL::ConstString asConstString() const;
273273
#endif

0 commit comments

Comments
 (0)