Added detection for the version of libjson used in the system
Also, fixed printing of entire json objects
(cherry picked from commit 6f9c8c383d6026293ddc095dc3abcef488cd266d)