|
pjson 1.0.0
A small, owning JSON value for C++11
|
Minimal C++11-compatible, non-owning view of a JSON string. A view aliases bytes owned by this pjson node and is valid only while that node remains alive and unchanged. Assignment, reset, swap, move, destruction, erasing the node, or replacing/resetting an ancestor invalidates it. Strings may contain embedded NUL bytes; use size() rather than strlen(). More...
#include <pjson.h>
Public Member Functions | |
| StringView () noexcept | |
Public API member StringView; see the API overview for its contract. / Returns the borrowed first byte; a default view returns null. | |
| const char * | data () const noexcept |
Public API member data; see the API overview for its contract. / Returns the number of bytes in the view, including embedded NUL bytes. | |
| size_t | size () const noexcept |
Public API member size; see the API overview for its contract. / Returns whether size() is zero. | |
| bool | empty () const noexcept |
Public API member empty; see the API overview for its contract. | |
Minimal C++11-compatible, non-owning view of a JSON string. A view aliases bytes owned by this pjson node and is valid only while that node remains alive and unchanged. Assignment, reset, swap, move, destruction, erasing the node, or replacing/resetting an ancestor invalidates it. Strings may contain embedded NUL bytes; use size() rather than strlen().
|
noexcept |
Public API member StringView; see the API overview for its contract. / Returns the borrowed first byte; a default view returns null.
Public API member data; see the API overview for its contract. / Returns the number of bytes in the view, including embedded NUL bytes.
|
noexcept |
Public API member empty; see the API overview for its contract.
|
noexcept |
Public API member size; see the API overview for its contract. / Returns whether size() is zero.