code: def test_use_custom_jsonencoder(self, app, client):
      class CabageEncoder(JSONEncoder):
          def default(self, obj):
              return "cabbage"
  
      class TestConfig(object):
          RESTPLUS_JSON = {"cls": CabageEncoder}
  
      app.config.from_object(TestConfig)
      api = restplus.Api(app)
  
      class Cabbage(restplus.Resource):
          def get(self):
              return {"frob": object()}
  
      api.add_resource(Cabbage, "/cabbage")
  
      data = client.get("/cabbage").data
  
      expected = b'{"frob": "cabbage"}\n'
      assert data == expected
  
imports: from __future__ import unicode_literals
  import flask
  import pytest
  import six
  from json import dumps, JSONEncoder
  from flask import Blueprint, redirect, views
  from werkzeug.exceptions import HTTPException, Unauthorized, BadRequest
  import flask_restplus
label_desc: Use image node_id 35 for calling the APITest obj's underlying member method code with example usage: obj.test_use_custom_jsonencoder(app, client) and returns: str, dict