Adding libjson code. Could not make it work.