call toJSON on subject