mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2026-01-27 18:23:10 +00:00
18 lines
446 B
C++
18 lines
446 B
C++
//
|
|
// Created by stephane bourque on 2021-07-05.
|
|
//
|
|
|
|
#include "RESTAPI_utils.h"
|
|
|
|
namespace OpenWifi::RESTAPI_utils {
|
|
|
|
void EmbedDocument(const std::string & ObjName, Poco::JSON::Object & Obj, const std::string &ObjStr) {
|
|
std::string D = ObjStr.empty() ? "{}" : ObjStr;
|
|
Poco::JSON::Parser P;
|
|
Poco::Dynamic::Var result = P.parse(D);
|
|
const auto &DetailsObj = result.extract<Poco::JSON::Object::Ptr>();
|
|
Obj.set(ObjName, DetailsObj);
|
|
}
|
|
}
|
|
|