Advertisement
zoltanb

Untitled

May 8th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. AuthenticationRequest JsonSerDes::Deserialize(void* deserializable) {
  2.   auto data_p = (char*)deserializable;
  3.   nlohmann::json json = nlohmann::json::parse(data_p);
  4.  
  5.   AuthenticationRequest request = json.get<AuthenticationRequest>();
  6.   return request;
  7. }
  8.  
  9. void* JsonSerDes::Serialize(AuthenticationResponse* serializable) {
  10.   throw std::runtime_error("JSON 'Serialize' not yet implemented.");
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement