- yhook: allow multiple json arrays

This commit is contained in:
svenhoefer
2016-02-25 15:34:43 +01:00
parent d96f15fb6c
commit 75a6848a79
2 changed files with 4 additions and 2 deletions

View File

@@ -452,7 +452,7 @@ std::string CyhookHandler::outPair(std::string _key, std::string _content, bool
}
//-----------------------------------------------------------------------------
std::string CyhookHandler::outArray(std::string _key, std::string _content) {
std::string CyhookHandler::outArray(std::string _key, std::string _content, bool _next) {
std::string result = "";
switch (outType) {
case xml:
@@ -463,6 +463,8 @@ std::string CyhookHandler::outArray(std::string _key, std::string _content) {
case json:
//TODO: json check
result = outIndent() + "\"" + _key + "\": [" + _content + "]";
if(_next)
result += ",";
result += "\n";
break;
default: