veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::json Namespace Reference

Package that contains adaptors to simplify serialization of entities to JSON. More...

Functions

template<typename Value , typename Iterable >
void putArrayKV (Value &object, const std::string &key, const Iterable &val)
 

Detailed Description

Depending on altchain, different JSON libraries can be used. Provide specializations of methods from this namespace to use ToJSON<T>(...).

Function Documentation

◆ putArrayKV()

template<typename Value , typename Iterable >
void altintegration::json::putArrayKV ( Value &  object,
const std::string &  key,
const Iterable &  val 
)

Definition at line 128 of file json.hpp.

128 {
129 auto arr = makeEmptyArray<Value>();
130 for (const auto& it : val) {
131 arrayPushBack(arr, ToJSON<Value>(it));
132 }
133 putKV(object, key, arr);
134}