title: Grails - Initiating domain class using JSON
body: <p>I have this simple domain class:</p>
  
  <pre><code>class Settings {
  static constraints = {
      uid(nullable: false, unique: true)
      person()
  }
  
  String uid
  Map person
  }
  </code></pre>
  
  <p>and a web UI that update the data using a json request:</p>
  
  <pre><code>{"uid":1234 , person:{"first_name" : "jhon" , "last_name" : "doe"}}
  </code></pre>
  
  <p>in the controller code:</p>
  
  <pre><code>def json = request.JSON;
  def s = new Settings(json);
  </code></pre>
  
  <p>it seems that <strong>s.uid</strong> is being set however the <strong>s.person</strong> Map remains empty.
  What am I missing?</p>