CernVM-FS
2.12.0
|
#include <json_document.h>
Classes | |
struct | PrintOptions |
Public Member Functions | |
~JsonDocument () | |
std::string | PrintCanonical () |
std::string | PrintPretty () |
const JSON * | root () const |
bool | IsValid () const |
Static Public Member Functions | |
static JsonDocument * | Create (const std::string &text) |
static std::string | EscapeString (const std::string &input) |
static JSON * | SearchInObject (const JSON *json_object, const std::string &name, const json_type type) |
Private Member Functions | |
JsonDocument () | |
bool | Parse (const std::string &text) |
std::string | PrintValue (JSON *value, PrintOptions print_options) |
std::string | PrintArray (JSON *first_child, PrintOptions print_options) |
std::string | PrintObject (JSON *first_child, PrintOptions print_options) |
Private Member Functions inherited from SingleCopy | |
SingleCopy () | |
Private Attributes | |
block_allocator | allocator_ |
JSON * | root_ |
char * | raw_text_ |
Static Private Attributes | |
static const unsigned | kDefaultBlockSize = 2048 |
Definition at line 17 of file json_document.h.
JsonDocument::~JsonDocument | ( | ) |
Definition at line 46 of file json_document.cc.
|
private |
Definition at line 43 of file json_document.cc.
|
static |
Definition at line 18 of file json_document.cc.
Referenced by publish::SyncMediator::Add(), receiver::CheckToken(), upload::SessionContext::DoUpload(), notify::msg::Activity::FromJSONString(), receiver::GetTokenPublicId(), receiver::Reactor::HandleCheckToken(), receiver::Reactor::HandleCommit(), receiver::Reactor::HandleGenerateToken(), receiver::Reactor::HandleSubmitPayload(), MakeEndRequest(), ParseAcquireReply(), anonymous_namespace{repository_session.cc}::ParseAcquireReply(), ParseDropReply(), anonymous_namespace{repository_session.cc}::ParseDropReply(), and AuthzExternalFetcher::ParseMsg().
|
static |
Definition at line 25 of file json_document.cc.
Referenced by PrintValue().
|
inline |
Definition at line 26 of file json_document.h.
Referenced by ParseAcquireReply(), anonymous_namespace{repository_session.cc}::ParseAcquireReply(), ParseDropReply(), and anonymous_namespace{repository_session.cc}::ParseDropReply().
|
private |
Parses a JSON string in text.
Definition at line 55 of file json_document.cc.
Referenced by Create().
|
private |
Definition at line 81 of file json_document.cc.
Referenced by PrintValue().
string JsonDocument::PrintCanonical | ( | ) |
JSON string in a canonical format:
Can be used as a canonical representation to sign or encrypt a JSON text.
Definition at line 112 of file json_document.cc.
|
private |
Definition at line 118 of file json_document.cc.
Referenced by PrintCanonical(), PrintPretty(), and PrintValue().
string JsonDocument::PrintPretty | ( | ) |
JSON string for humans.
Definition at line 146 of file json_document.cc.
|
private |
Definition at line 153 of file json_document.cc.
Referenced by PrintArray(), and PrintObject().
|
inline |
Definition at line 25 of file json_document.h.
Referenced by receiver::CheckToken(), upload::SessionContext::DoUpload(), receiver::Reactor::ExtractStatsFromReq(), notify::msg::Activity::FromJSONString(), receiver::GetTokenPublicId(), receiver::Reactor::HandleCheckToken(), receiver::Reactor::HandleCommit(), receiver::Reactor::HandleGenerateToken(), receiver::Reactor::HandleSubmitPayload(), MakeEndRequest(), Parse(), ParseAcquireReply(), anonymous_namespace{repository_session.cc}::ParseAcquireReply(), ParseDropReply(), anonymous_namespace{repository_session.cc}::ParseDropReply(), and AuthzExternalFetcher::ParseMsg().
|
static |
Definition at line 190 of file json_document.cc.
Referenced by receiver::CheckToken(), upload::SessionContext::DoUpload(), receiver::Reactor::ExtractStatsFromReq(), GetFromJSON< float >(), GetFromJSON< int >(), GetFromJSON< std::string >(), receiver::GetTokenPublicId(), receiver::Reactor::HandleCheckToken(), receiver::Reactor::HandleCommit(), receiver::Reactor::HandleGenerateToken(), receiver::Reactor::HandleSubmitPayload(), MakeEndRequest(), ParseAcquireReply(), anonymous_namespace{repository_session.cc}::ParseAcquireReply(), ParseDropReply(), anonymous_namespace{repository_session.cc}::ParseDropReply(), AuthzExternalFetcher::ParseMsg(), AuthzExternalFetcher::ParseMsgId(), AuthzExternalFetcher::ParsePermit(), and AuthzExternalFetcher::ParseRevision().
|
private |
Definition at line 47 of file json_document.h.
Referenced by Parse().
|
staticprivate |
Definition at line 33 of file json_document.h.
|
private |
Definition at line 49 of file json_document.h.
Referenced by Parse(), and ~JsonDocument().
|
private |
Definition at line 48 of file json_document.h.
Referenced by IsValid(), Parse(), PrintCanonical(), PrintPretty(), and root().