transform the value into JSON format