Adding Json Support to the Framework

Closes issues #158, #159, #165 and #166.