add toJSON support for observable