libzypp  17.23.8
zypp::json::Array Class Reference

JSON array. More...

#include <Json.h>

Public Member Functions

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

Private Attributes

std::list< std::string > _data

Related Functions

(Note that these are not member functions.)

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

Detailed Description

JSON array.

Definition at line 256 of file Json.h.

Constructor & Destructor Documentation

◆ Array() [1/3]

zypp::json::Array::Array ( )

Definition at line 258 of file Json.h.

◆ Array() [2/3]

template<class Iterator >
zypp::json::Array::Array ( Iterator  begin,
Iterator  end 

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)

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)

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)

Definition at line 275 of file Json.h.

◆ asJSON()

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

JSON representation.

Definition at line 279 of file Json.h.

◆ asString()

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

String representation.

Definition at line 283 of file Json.h.

◆ dumpOn()

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

Stream output.

Definition at line 287 of file Json.h.

Friends And Related Function Documentation

◆ operator<<()

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

Stream output

Definition at line 302 of file Json.h.

Member Data Documentation

◆ _data

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

Definition at line 298 of file Json.h.

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