libzypp: zypp::json Namespace Reference

libzypp 17.38.15

zypp::json Namespace Reference

## Namespaces
namespace | detail

## Classes
class | Array
class | Bool
class | Int
class | Null
class | Number
class | Object
class | String
class | UInt
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)
Value | parseDocument (const InputStream &input_r)
| Parse a JSON document from input_r.
static constexpr std::string_view | trueJSON ("true")
static constexpr std::string_view | falseJSON ("false")
ZYPP_API std::ostream & | operator<< (std::ostream &str, const Bool &obj)
| relates: Bool Stream output
static constexpr std::string_view | nullJSON ("null")
ZYPP_API std::ostream & | operator<< (std::ostream &str, const Null &obj)
| relates: Null Stream output
ZYPP_API 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
ZYPP_API std::ostream & | operator<< (std::ostream &str, const String &obj)
| relates: String Stream output
ZYPP_API std::ostream & | operator<< (std::ostream &str, const Array &obj)
| relates: Array Stream output
ZYPP_API std::ostream & | operator<< (std::ostream &str, const Object &obj)
| relates: Object Stream output
ZYPP_API std::ostream & | operator<< (std::ostream &str, const Value &obj)
| relates: Value Stream output
template<typename T>
Value ZYPP_API | toJSON (T &&v)

## 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.

## ◆ parseDocument()

ZYPP_API Value zypp::json::parseDocument | ( | const InputStream & | input_r | ) |

Parse a JSON document from input_r.

Exceptions

  parser::ParseException | on malformed input. Safe to use from any consumer — no NG types in this signature.

Definition at line 23 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]

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

relates: Bool Stream output

Definition at line 59 of file JsonBool.h.

## ◆ nullJSON()

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

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

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

relates: Null Stream output

Definition at line 49 of file JsonNull.h.

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

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

relates: Number Stream output

Definition at line 55 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 93 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 131 of file JsonNumber.h.

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

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

relates: String Stream output

Definition at line 165 of file JsonString.h.

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

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

relates: Array Stream output

Definition at line 95 of file JsonValue.h.

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

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

relates: Object Stream output

Definition at line 168 of file JsonValue.h.

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

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

relates: Value Stream output

Definition at line 320 of file JsonValue.h.

## ◆ toJSON() [3/3]

template<typename T>

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

Definition at line 324 of file JsonValue.h.