Replaced libjson-c with libjsoncpp. This significantly simplifies the code and makes it more maintainable.