title: MongoEngine Document Object made using from_json doesn't save
body: <p>I am trying to build a document object using from_json method. object.save() throws no error, but the document is not inserted in mongo.</p>
  
  <p>On the other hand if I make the object by assigning values to each of the fields, it works fine.</p>
  
  <p>I am unable to find the reason for this. Below is the code for both the cases.</p>
  
  <pre><code>from flask import Flask
  from flask.ext.mongoengine import MongoEngine
  import json, datetime
  
  app = Flask(__name__)
  app.config["MONGODB_SETTINGS"] = {'DB': 'test','host': 'localhost'}
  app.config["SECRET_KEY"] = "mySecretKey"
  
  db = MongoEngine(app)
  class User(db.Document):
      user_id = db.StringField(max_length=16, primary_key = True)
      username = db.StringField(min_length=8)
      email = db.EmailField(required = True, unique = True)
      password = db.StringField(required = True)
      date_of_birth = db.DateTimeField()
      gender = db.StringField(choices = ('M', 'F'))
  
  '''
      This one works. This will add a user in local mongodb(test)
  '''
  u1 = User()
  u1.username = 'test12345'
  u1.user_id = 'testid12345'
  u1.email = 'test@test.com'
  u1.password = 'testerpass'
  u1.save()
  
  '''
      This one doesn't works.
  '''
  u2 = User()
  temp_json = {'username':'test2_12345','user_id':'testid2@12345','password':'testerpass2','email':'test2@test.com'}
  u2 = u2.from_json(json.dumps(temp_json))
  u2.save()
  </code></pre>