Skip to content

Commit

Permalink
Fixed a small bug when reading strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
kutsurak committed Dec 14, 2011
1 parent a8347b4 commit 6503545
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion JSON.cpp
Expand Up @@ -57,7 +57,7 @@ std::string Members::toJSON(int spc, bool skip_initial) const {
typedef std::map<std::string, Value*>::const_iterator map_iterator;
for (map_iterator it = pairs_.begin();
it != pairs_.end(); it++) {
str += spcs + "\"" + it->first + "\" : " + it->second->toJSON(spc, true);
str += spcs + it->first + " : " + it->second->toJSON(spc, true);
if (i < sz - 1) {
str += ",\n";
i++;
Expand Down
2 changes: 1 addition & 1 deletion JSONParser.cpp
Expand Up @@ -251,7 +251,7 @@ Value *Parser::jString() {
}

Value *ret = new Value();
ret->SetValue(str);
ret->SetValue("\"" + str + "\"");

return ret;
}
Expand Down

0 comments on commit 6503545

Please sign in to comment.