code: public static <T> T fromJSON(final Class<T> targetClass, final String json) {
          if (targetClass.equals(Bson.class) || targetClass.equals(Document.class)) {
              final Document doc = new Document();
              jsonParser.readString(doc, json);
              return (T) doc;
          } else if (targetClass.equals(BasicBSONObject.class)) {
              final BasicBSONObject result = new BasicBSONObject();
              jsonParser.readString(result, json);
              return (T) result;
          } else if (targetClass.equals(BasicDBObject.class)) {
              final BasicDBObject result = new BasicDBObject();
              jsonParser.readString(result, json);
              return (T) result;
          } else {
              throw new IllegalArgumentException("Unsupported type: " + ClassUtil.getCanonicalClassName(targetClass));
          }
      }
docs: Returns an instance of the specified target class with the property values from the specified JSON String.
  
  @param targetClass <code>Bson.class</code>, <code>Document.class</code>, <code>BasicBSONObject.class</code>, <code>BasicDBObject.class</code>
  @param json
  @return