Skip to content
Repos

DevPlaceApp

C++ 308 B12 lines Opens in site

Directory Raw Download

#include "model/NotificationCounts.hpp"

#include "core/JsonDecode.hpp"

namespace dp {

NotificationCounts NotificationCounts::fromJson(const Json& j) {
  using D = JsonDecode;
  return NotificationCounts{D::req<std::int64_t>(j, "notifications"), D::req<std::int64_t>(j, "messages")};
}

}  // namespace dp
19.9ms