summaryrefslogtreecommitdiffstats
path: root/src/uscxml/messages/Data.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uscxml/messages/Data.cpp')
-rw-r--r--src/uscxml/messages/Data.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/uscxml/messages/Data.cpp b/src/uscxml/messages/Data.cpp
index 51e1191..8cd6c20 100644
--- a/src/uscxml/messages/Data.cpp
+++ b/src/uscxml/messages/Data.cpp
@@ -216,7 +216,7 @@ std::string Data::asJSON() const {
std::string Data::toJSON(const Data& data) {
std::stringstream os;
std::string indent;
- for (size_t i = 0; i < _dataIndentation; i++) {
+ for (size_t i = 0; i <= _dataIndentation; i++) {
indent += " ";
}
if (false) {
@@ -233,7 +233,7 @@ std::string Data::toJSON(const Data& data) {
keyPadding += " ";
std::string seperator;
- os << std::endl << indent << "{";
+ os << "{";
compoundIter = data.compound.begin();
while(compoundIter != data.compound.end()) {
os << seperator << std::endl << indent << " \"" << jsonEscape(compoundIter->first) << "\": " << keyPadding.substr(0, longestKey - compoundIter->first.size());