Enable script hook to handle Json input

This patch adds conversion of Json type input into a string so that it
can be consumed by scripts (e.g. Python or Bash).

Change-Id: I715819dc8e0c1c9119b544330d5b0c77e9c2f924
Closes-Bug: #1392802
Merge "Enable script hook to handle Json input"