Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Go to the documentation of this file. 16 outS.reserve(inS.size() * 2);
18 for (
unsigned int i = 0; i < inS.size(); i++) {
19 unsigned char ch = inS[i];
20 const char *escStr =
escapes[ch];
32 unsigned int indentLevel)
const 37 unsigned int modIndent = indentLevel;
46 writeObject(prettyIndent, modIndent, s);
49 writeArray(prettyIndent, modIndent, s);
58 s += (val ==
"1" ?
"true" :
"false");
65 static void indentStr(
unsigned int prettyIndent,
unsigned int indentLevel,
string& s)
67 s.append(prettyIndent * indentLevel,
' ');
76 for (
unsigned int i = 0; i < values.size(); i++) {
79 s += values[i].write(prettyIndent, indentLevel + 1);
80 if (i != (values.size() - 1)) {
88 indentStr(prettyIndent, indentLevel - 1, s);
98 for (
unsigned int i = 0; i < keys.size(); i++) {
104 s += values.at(i).write(prettyIndent, indentLevel + 1);
105 if (i != (values.size() - 1))
112 indentStr(prettyIndent, indentLevel - 1, s);
static std::string escapes[256]
std::string write(unsigned int prettyIndent=0, unsigned int indentLevel=0) const
static string json_escape(const string &inS)
static void indentStr(unsigned int prettyIndent, unsigned int indentLevel, string &s)
void writeObject(unsigned int prettyIndent, unsigned int indentLevel, std::string &s) const
void writeArray(unsigned int prettyIndent, unsigned int indentLevel, std::string &s) const