code: @Override
      public void put(String key, String value) throws Exception{
          try {
              Object valueObj = datatypeMap.get(key).parse(value);
              generator.writeObjectField(key, valueObj);
          } catch (ParseException e) {
              throw new ParseException("Value " + value + " is not type "
                      + datatypeMap.get(key).name(), 0);
          } catch (Exception e) {
              String msg = e.getMessage();
              if (!msg.contains("missing value")) {
                  throw new Exception(msg);
              }
          }       
          
      }
docs: /*
  @see com.marklogic.contentpump.DocBuilder#put(java.lang.String, java.lang.String)