| 68 | } |
| 69 | |
| 70 | void UniValue::writeArray(unsigned int prettyIndent, unsigned int indentLevel, string& s) const |
| 71 | { |
| 72 | s += "["; |
| 73 | if (prettyIndent) |
| 74 | s += "\n"; |
| 75 | |
| 76 | for (unsigned int i = 0; i < values.size(); i++) { |
| 77 | if (prettyIndent) |
| 78 | indentStr(prettyIndent, indentLevel, s); |
| 79 | s += values[i].write(prettyIndent, indentLevel + 1); |
| 80 | if (i != (values.size() - 1)) { |
| 81 | s += ","; |
| 82 | } |
| 83 | if (prettyIndent) |
| 84 | s += "\n"; |
| 85 | } |
| 86 | |
| 87 | if (prettyIndent) |
| 88 | indentStr(prettyIndent, indentLevel - 1, s); |
| 89 | s += "]"; |
| 90 | } |
| 91 | |
| 92 | void UniValue::writeObject(unsigned int prettyIndent, unsigned int indentLevel, string& s) const |
| 93 | { |