small improvemnts to json marshalling

Thanks to those samll changes developer using jsonrpc won't marshall
object to json by hand.

Change-Id: I39f7c562512fcc49a2c7f7bf8ab42ee532c58b22
Signed-off-by: pkliczewski <piotr.kliczewski@gmail.com>
Signed-off-by: Saggi Mizrahi <ficoos@gmail.com>