Added MarshalJSON support for the objects that supports this interface