toJSON method supplies derived methods with options