Write a JSON array of arguments to an output stream. \param out Stream to which output should be written. */
| 1427 | |
| 1428 | */ |
| 1429 | void dump3(std::ostream& out) const |
| 1430 | { |
| 1431 | out << "["; |
| 1432 | bool bFirst(true); |
| 1433 | for (auto ai = m_args.begin(); ai != m_args.end(); ++ai) |
| 1434 | { |
| 1435 | Arg *a = ai->get(); |
| 1436 | |
| 1437 | if (!bFirst) |
| 1438 | out << ","; |
| 1439 | |
| 1440 | out << "{\"name\":\"" << a->longname() << "\""; |
| 1441 | |
| 1442 | if (a->defaultProvided()) |
| 1443 | out << ",\"default\":\"" << Utils::escapeJSON(a->defaultVal()) << "\""; |
| 1444 | |
| 1445 | out << ",\"description\":\"" << Utils::escapeJSON(a->description()) << "\"}"; |
| 1446 | |
| 1447 | bFirst = false; |
| 1448 | } |
| 1449 | out << "]"; |
| 1450 | } |
| 1451 | |
| 1452 | private: |
| 1453 | /* |
no test coverage detected