Add decimal support to the JSON encoder

Change-Id: I7f5c427fd41aa56dfda561e2c49ba05b2a3dd242