Function that encodes an object of type T to a JSON String
Function that decodes a JSON String to an object of type T