libzypp: zypp::json::Value Class Reference

libzypp 17.38.14

zypp::json::Value Class Reference

`#include <zypp-core/parser/json/JsonValue.h>`

## Public Types
enum | Type { NullType , BoolType , StringType , IntType , UIntType , NumberType , ObjectType , ArrayType }

## Public Member Functions
| ~Value ()=default
| Value (const Value &)=default
| Value (Value &&)=default
Value & | operator= (const Value &)=default
Value & | operator= (Value &&)=default
| Value ()=default
| Value (std::nullptr_t)
| Value (bool val_r)
| Value (std::int8_t val_r)
| Value (std::int16_t val_r)
| Value (std::int32_t val_r)
| Value (std::int64_t val_r)
| Value (std::uint8_t val_r)
| Value (std::uint16_t val_r)
| Value (std::uint32_t val_r)
| Value (std::uint64_t val_r)
| Value (float val_r)
| Value (double val_r)
| Value (const char val_r)
| Value (const char *val_r)
| Value (std::string val_r)
| Value (Null val_r)
| Value (Bool val_r)
| Value (String val_r)
| Value (Int val_r)
| Value (UInt val_r)
| Value (Number val_r)
| Value (Object val_r)
| Value (Array val_r)
std::string | asJSON () const
| JSON representation.
const Null & | asNull () const
const Bool & | asBool () const
const String & | asString () const
const Int & | asInt () const
const UInt & | asUInt () const
const Number & | asNumber () const
const Object & | asObject () const
const Array & | asArray () const
std::ostream & | dumpOn (std::ostream &str) const
| Stream output.
bool | isNull () const
Type | type () const
bool | operator== (const Value &other) const

## Private Types
using | JsonValueData = std::variant<Null, Bool, String, Int, UInt, Number, Object, Array>

## Private Attributes
JsonValueData | _value = Null()

## Detailed Description

Definition at line 173 of file JsonValue.h.

## Member Typedef Documentation

## ◆ JsonValueData

using zypp::json::Value::JsonValueData = std::variant<Null, Bool, String, Int, UInt, Number, Object, Array>
| private

Definition at line 307 of file JsonValue.h.

## Member Enumeration Documentation

## ◆ Type

enum zypp::json::Value::Type

Enumerator
NullType |
BoolType |
StringType |
IntType |
UIntType |
NumberType |
ObjectType |
ArrayType |

Definition at line 178 of file JsonValue.h.

## Constructor & Destructor Documentation

## ◆ ~Value()

zypp::json::Value::~Value | ( |  | ) |
| default

## ◆ Value() [1/26]

zypp::json::Value::Value | ( | const Value & |  | ) |
| default

## ◆ Value() [2/26]

zypp::json::Value::Value | ( | Value && |  | ) |
| default

## ◆ Value() [3/26]

zypp::json::Value::Value | ( |  | ) |
| default

## ◆ Value() [4/26]

zypp::json::Value::Value | ( | std::nullptr_t |  | ) |
| inline

Definition at line 198 of file JsonValue.h.

## ◆ Value() [5/26]

zypp::json::Value::Value | ( | bool | val_r | ) |
| inline

Definition at line 201 of file JsonValue.h.

## ◆ Value() [6/26]

zypp::json::Value::Value | ( | std::int8_t | val_r | ) |
| inline

Definition at line 204 of file JsonValue.h.

## ◆ Value() [7/26]

zypp::json::Value::Value | ( | std::int16_t | val_r | ) |
| inline

Definition at line 205 of file JsonValue.h.

## ◆ Value() [8/26]

zypp::json::Value::Value | ( | std::int32_t | val_r | ) |
| inline

Definition at line 206 of file JsonValue.h.

## ◆ Value() [9/26]

zypp::json::Value::Value | ( | std::int64_t | val_r | ) |
| inline

Definition at line 207 of file JsonValue.h.

## ◆ Value() [10/26]

zypp::json::Value::Value | ( | std::uint8_t | val_r | ) |
| inline

Definition at line 209 of file JsonValue.h.

## ◆ Value() [11/26]

zypp::json::Value::Value | ( | std::uint16_t | val_r | ) |
| inline

Definition at line 210 of file JsonValue.h.

## ◆ Value() [12/26]

zypp::json::Value::Value | ( | std::uint32_t | val_r | ) |
| inline

Definition at line 211 of file JsonValue.h.

## ◆ Value() [13/26]

zypp::json::Value::Value | ( | std::uint64_t | val_r | ) |
| inline

Definition at line 212 of file JsonValue.h.

## ◆ Value() [14/26]

zypp::json::Value::Value | ( | float | val_r | ) |
| inline

Definition at line 214 of file JsonValue.h.

## ◆ Value() [15/26]

zypp::json::Value::Value | ( | double | val_r | ) |
| inline

Definition at line 215 of file JsonValue.h.

## ◆ Value() [16/26]

zypp::json::Value::Value | ( | const char | val_r | ) |
| inline

Definition at line 218 of file JsonValue.h.

## ◆ Value() [17/26]

zypp::json::Value::Value | ( | const char * | val_r | ) |
| inline

Definition at line 219 of file JsonValue.h.

## ◆ Value() [18/26]

zypp::json::Value::Value | ( | std::string | val_r | ) |
| inline

Definition at line 220 of file JsonValue.h.

## ◆ Value() [19/26]

zypp::json::Value::Value | ( | Null | val_r | ) |
| inline

Definition at line 229 of file JsonValue.h.

## ◆ Value() [20/26]

zypp::json::Value::Value | ( | Bool | val_r | ) |
| inline

Definition at line 230 of file JsonValue.h.

## ◆ Value() [21/26]

zypp::json::Value::Value | ( | String | val_r | ) |
| inline

Definition at line 231 of file JsonValue.h.

## ◆ Value() [22/26]

zypp::json::Value::Value | ( | Int | val_r | ) |
| inline

Definition at line 232 of file JsonValue.h.

## ◆ Value() [23/26]

zypp::json::Value::Value | ( | UInt | val_r | ) |
| inline

Definition at line 233 of file JsonValue.h.

## ◆ Value() [24/26]

zypp::json::Value::Value | ( | Number | val_r | ) |
| inline

Definition at line 234 of file JsonValue.h.

## ◆ Value() [25/26]

zypp::json::Value::Value | ( | Object | val_r | ) |
| inline

Definition at line 235 of file JsonValue.h.

## ◆ Value() [26/26]

zypp::json::Value::Value | ( | Array | val_r | ) |
| inline

Definition at line 236 of file JsonValue.h.

## Member Function Documentation

## ◆ operator=() [1/2]

Value & zypp::json::Value::operator= | ( | const Value & |  | ) |
| default

## ◆ operator=() [2/2]

Value & zypp::json::Value::operator= | ( | Value && |  | ) |
| default

## ◆ asJSON()

std::string zypp::json::Value::asJSON | ( |  | ) | const

JSON representation.

Definition at line 110 of file JsonValue.cc.

## ◆ asNull()

const Null & zypp::json::Value::asNull | ( |  | ) | const
| inline

Definition at line 241 of file JsonValue.h.

## ◆ asBool()

const Bool & zypp::json::Value::asBool | ( |  | ) | const
| inline

Definition at line 245 of file JsonValue.h.

## ◆ asString()

const String & zypp::json::Value::asString | ( |  | ) | const
| inline

Definition at line 249 of file JsonValue.h.

## ◆ asInt()

const Int & zypp::json::Value::asInt | ( |  | ) | const
| inline

Definition at line 253 of file JsonValue.h.

## ◆ asUInt()

const UInt & zypp::json::Value::asUInt | ( |  | ) | const
| inline

Definition at line 257 of file JsonValue.h.

## ◆ asNumber()

const Number & zypp::json::Value::asNumber | ( |  | ) | const
| inline

Definition at line 261 of file JsonValue.h.

## ◆ asObject()

const Object & zypp::json::Value::asObject | ( |  | ) | const
| inline

Definition at line 265 of file JsonValue.h.

## ◆ asArray()

const Array & zypp::json::Value::asArray | ( |  | ) | const
| inline

Definition at line 269 of file JsonValue.h.

## ◆ dumpOn()

std::ostream & zypp::json::Value::dumpOn | ( | std::ostream & | str | ) | const
| inline

Stream output.

Definition at line 274 of file JsonValue.h.

## ◆ isNull()

bool zypp::json::Value::isNull | ( |  | ) | const
| inline

Definition at line 277 of file JsonValue.h.

## ◆ type()

Type zypp::json::Value::type | ( |  | ) | const
| inline

Definition at line 281 of file JsonValue.h.

## ◆ operator==()

bool zypp::json::Value::operator== | ( | const Value & | other | ) | const
| inline

Definition at line 304 of file JsonValue.h.

## Member Data Documentation

## ◆ _value

JsonValueData zypp::json::Value::_value = Null()
| private

Definition at line 308 of file JsonValue.h.

The documentation for this class was generated from the following files:

- zypp-core/parser/json/JsonValue.h
- zypp-core/parser/json/JsonValue.cc