libzypp 17.36.7

Public Member Functions | Private Attributes | Related Symbols | List of all members
zypp::json::Array Class Reference

JSON array. More...

`#include <zypp/base/Json.h>`

## Public Member Functions
| Array ()
template<class Iterator>
| Array (Iterator begin, Iterator end)
| Construct from container iterator.
| Array (const std::initializer_list< Value > &contents_r)
| Construct from container initializer list { v1, v2,... }.
void | add (const Value &val_r)
| Push JSON Value to Array.
void | add (const std::initializer_list< Value > &contents_r)
std::string | asJSON () const
| JSON representation.
std::string | asString () const
| String representation.
std::ostream & | dumpOn (std::ostream &str) const
| Stream output.

## Private Attributes
std::list< std::string > | _data

## Related Symbols
(Note that these are not member symbols.)
std::ostream & | operator<< (std::ostream &str, const Array &obj)
| Stream output.

## Detailed Description

JSON array.

Definition at line 256 of file Json.h.

## Constructor & Destructor Documentation

## ◆ Array() [1/3]

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

Definition at line 258 of file Json.h.

## ◆ Array() [2/3]

template<class Iterator>

zypp::json::Array::Array | ( | Iterator | begin,
|  | Iterator | end )
| inline

Construct from container iterator.

Definition at line 262 of file Json.h.

## ◆ Array() [3/3]

zypp::json::Array::Array | ( | const std::initializer_list< Value > & | contents_r | ) |
| inline

Construct from container initializer list { v1, v2,... }.

Definition at line 266 of file Json.h.

## Member Function Documentation

## ◆ add() [1/2]

void zypp::json::Array::add | ( | const Value & | val_r | ) |
| inline

Push JSON Value to Array.

Definition at line 271 of file Json.h.

## ◆ add() [2/2]

void zypp::json::Array::add | ( | const std::initializer_list< Value > & | contents_r | ) |
| inline

Definition at line 275 of file Json.h.

## ◆ asJSON()

std::string zypp::json::Array::asJSON | ( |  | ) | const
| inline

JSON representation.

Definition at line 279 of file Json.h.

## ◆ asString()

std::string zypp::json::Array::asString | ( |  | ) | const
| inline

String representation.

Definition at line 283 of file Json.h.

## ◆ dumpOn()

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

Stream output.

Definition at line 287 of file Json.h.

## Friends And Related Symbol Documentation

## ◆ operator<<()

std::ostream & operator<< | ( | std::ostream & | str,
|  | const Array & | obj )
| related

Stream output.

Definition at line 302 of file Json.h.

## Member Data Documentation

## ◆ _data

std::list<std::string> zypp::json::Array::_data
| private

Definition at line 298 of file Json.h.

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

- zypp/base/Json.h