code: @SuppressWarnings("unchecked")
      public static org.bson.Document decodeMongoDoc(org.bson.Document doc) {
          org.bson.Document newDoc = new org.bson.Document();
          for (String key : doc.keySet()) {
              Object value = doc.get(key);
              if (value instanceof org.bson.Document)
                  value = decodeMongoDoc(doc.get(key, org.bson.Document.class));
              else if (value instanceof List<?>) {
                  for (int i=0; i < ((List<?>)value).size(); i++) {
                      Object obj = ((List<?>)value).get(i);
                      if (obj instanceof org.bson.Document)
                          ((List<org.bson.Document>)value).set(i, decodeMongoDoc((org.bson.Document)obj));
                  }
              }
  
              String newKey = key;
              if (key.startsWith("\\uff04"))
                  newKey = "$" + key.substring(6);
              if (key.contains("\\uff0e")) {
                  newKey = newKey.replace("\\uff0e", ".");
              }
              newDoc.put(newKey, value);
          }
          return newDoc;
      }
docs: MongoDB doesn't allow keys to have dots (.) or to start with $.  This method decodes such keys back to dots and $ if found
  and returns a new BSON document