I understand that you guys want me to use hash maps instead of what I currently have. However hear me out, and I may sound crazy. But, I like my way
switch (hash(t.c_str())) {
case hash("READY"):
session_id = json::getValue(d->c_str(), "session_id");
onReady(d);
ready = true;
break;
case hash("RESUMED" ): onResumed (d) ; break;