libzypp: zypp::json Namespace Reference

libzypp 17.38.11

zypp::json Namespace Reference

## Namespaces
namespace | detail

## Classes
class | Parser
class | Bool
class | Null
class | Number
class | Int
class | UInt
class | String
class | Array
class | Object
class | Value

## Functions
template<>
json::Value | toJSON (const sat::Transaction::Step &step_r)
| See COMMITBEGIN (added in v1) on page Commit plugin for the specs.
template<>
json::Value | toJSON (const ZYppCommitResult::TransactionStepList &steps_r)
static bool | isWhiteSpace (const char ch)
static constexpr std::string_view | trueJSON ("true")
static constexpr std::string_view | falseJSON ("false")
std::ostream & | operator<< (std::ostream &str, const Bool &obj)
| relates: Bool Stream output
static constexpr std::string_view | nullJSON ("null")
std::ostream & | operator<< (std::ostream &str, const Null &obj)
| relates: Null Stream output
std::ostream & | operator<< (std::ostream &str, const Number &obj)
| relates: Number Stream output
std::ostream & | operator<< (std::ostream &str, const Int &obj)
| relates: Int Stream output
std::ostream & | operator<< (std::ostream &str, const UInt &obj)
| relates: UInt Stream output
std::ostream & | operator<< (std::ostream &str, const String &obj)
| relates: String Stream output
std::ostream & | operator<< (std::ostream &str, const Array &obj)
| relates: Array Stream output
std::ostream & | operator<< (std::ostream &str, const Object &obj)
| relates: Object Stream output
std::ostream & | operator<< (std::ostream &str, const Value &obj)
| relates: Value Stream output
template<typename T>
Value | toJSON (T &&v)

## Variables
constexpr std::string_view | TOK_NAMES [Parser::Token::TOK_COUNT]

## Function Documentation

## ◆ toJSON() [1/3]

template<>

json::Value zypp::json::toJSON | ( | const sat::Transaction::Step & | step_r | ) |
| inline

See COMMITBEGIN (added in v1) on page Commit plugin for the specs.

Definition at line 158 of file TargetImpl.cc.

## ◆ toJSON() [2/3]

template<>

json::Value zypp::json::toJSON | ( | const ZYppCommitResult::TransactionStepList & | steps_r | ) |
| inline

Definition at line 229 of file TargetImpl.cc.

## ◆ isWhiteSpace()

bool zypp::json::isWhiteSpace | ( | const char | ch | ) |
| static

Definition at line 32 of file json.cc.

## ◆ trueJSON()

constexpr std::string_view zypp::json::trueJSON | ( | "true" |  | ) |
| staticconstexpr

## ◆ falseJSON()

constexpr std::string_view zypp::json::falseJSON | ( | "false" |  | ) |
| staticconstexpr

## ◆ operator<<() [1/9]

std::ostream & zypp::json::operator<< | ( | std::ostream & | str,
|  | const Bool & | obj )
| inline

relates: Bool Stream output

Definition at line 56 of file JsonBool.h.

## ◆ nullJSON()

constexpr std::string_view zypp::json::nullJSON | ( | "null" |  | ) |
| staticconstexpr

## ◆ operator<<() [2/9]

std::ostream & zypp::json::operator<< | ( | std::ostream & | str,
|  | const Null & | obj )
| inline

relates: Null Stream output

Definition at line 46 of file JsonNull.h.

## ◆ operator<<() [3/9]

std::ostream & zypp::json::operator<< | ( | std::ostream & | str,
|  | const Number & | obj )
| inline

relates: Number Stream output

Definition at line 61 of file JsonNumber.h.

## ◆ operator<<() [4/9]

std::ostream & zypp::json::operator<< | ( | std::ostream & | str,
|  | const Int & | obj )
| inline

relates: Int Stream output

Definition at line 106 of file JsonNumber.h.

## ◆ operator<<() [5/9]

std::ostream & zypp::json::operator<< | ( | std::ostream & | str,
|  | const UInt & | obj )
| inline

relates: UInt Stream output

Definition at line 151 of file JsonNumber.h.

## ◆ operator<<() [6/9]

std::ostream & zypp::json::operator<< | ( | std::ostream & | str,
|  | const String & | obj )
| inline

relates: String Stream output

Definition at line 162 of file JsonString.h.

## ◆ operator<<() [7/9]

std::ostream & zypp::json::operator<< | ( | std::ostream & | str,
|  | const Array & | obj )
| inline

relates: Array Stream output

Definition at line 93 of file JsonValue.h.

## ◆ operator<<() [8/9]

std::ostream & zypp::json::operator<< | ( | std::ostream & | str,
|  | const Object & | obj )
| inline

relates: Object Stream output

Definition at line 166 of file JsonValue.h.

## ◆ operator<<() [9/9]

std::ostream & zypp::json::operator<< | ( | std::ostream & | str,
|  | const Value & | obj )
| inline

relates: Value Stream output

Definition at line 318 of file JsonValue.h.

## ◆ toJSON() [3/3]

template<typename T>

Value zypp::json::toJSON | ( | T && | v | ) |

Definition at line 322 of file JsonValue.h.

## Variable Documentation

## ◆ TOK_NAMES

std::string_view zypp::json::TOK_NAMES[Parser::Token::TOK_COUNT]
| constexpr

Initial value:
= {
"TOK_STRING",
"TOK_NUMBER_FLOAT",
"TOK_NUMBER_UINT",
"TOK_NUMBER_INT",
"TOK_BOOL_TRUE",
"TOK_BOOL_FALSE",
"TOK_NULL",
"TOK_LSQUARE_BRACKET",
"TOK_RSQUARE_BRACKET",
"TOK_LCURLY_BRACKET",
"TOK_RCURLY_BRACKET",
"TOK_COMMA",
"TOK_COLON",
"TOK_END"
}

Definition at line 15 of file json.cc.