title: How to make a JSON object serializable
body: <p>Is there a way to serialize a python class without using a custom encoder? I've tried the following approach but I get the error: TypeError: hello is not JSON serializable which is strange since "hello" is a string.</p>
  
  <pre><code>class MyObj(object):
  
      def __init__(self, address):
          self.address = address
  
      def __repr__(self):
          return self.address 
  
  x = MyObj("hello")
  
  print json.dumps(x)
  </code></pre>
  
  <p>The output should be simply</p>
  
  <pre><code>"hello"
  </code></pre>