Fixed the crash by implementing the original version of the json library again.
Catching std::runtime_error now.