Advertisement
Guest User

Untitled

a guest
May 25th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. if (route == "machine")
  2. {
  3. if (type == "GET")
  4. {
  5. jsonObj["data"] = {
  6. { "machines", {} }
  7. };
  8.  
  9. for(auto& it: machines)
  10. {
  11. jsonObj["data"]["machines"][jsonObj["data"]["machines"].size()] = {
  12. { "id", it.first },
  13. { "name", std::get<0>(it.second) },
  14. { "ip", std::get<1>(it.second) },
  15. { "port", std::get<2>(it.second) },
  16. { "status", std::get<3>(it.second) },
  17. { "lastSync", std::get<4>(it.second) }
  18. };
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement