title: How to load JSON data into nested classes?
body: <p>I have JSON data as follows:</p>
  
  <pre><code>{
      "Address": {
          "House_Number": 2,
          "State": "MA",
          "Street_Number": 13
      },
      "Name": "John"
  }
  </code></pre>
  
  <p>I want to load it into a class defined as follows:</p>
  
  <pre><code>class Address:
      def __init__(self):
          self.House_Number = 0
  
  class Employee:
      def __init__(self):
          self.Name = ''
          self.Address = Address()
  </code></pre>
  
  <p>If I use the class <code>Employee</code> as <code>object_hook</code>, then it uses the same class for both the objects (the outer object having <code>Name</code> and <code>Address</code> as members and inner object having members <code>House_Number</code> etc.).</p>
  
  <p>Basically, if <code>e</code> is the object in which the JSON data has been loaded, then
  <code>type(e.Address)</code> should be <code>Address</code> not <code>Employee</code>.</p>
  
  <p>Is there any way to load this JSON data into <code>Employee</code> class maintaining the class hierarchy?  The hierarchy can be arbitrarily deep.</p>