Use FormatJson instead of json_* functions

Change-Id: Ic4eccb13429d4081153b5deb550ac33bf2bd687d