Added json string formatter function