code: public String defaultToLiteral(RecordTemplateSpec.Field field) {
      boolean explicit = Boolean.TRUE.equals(field.getSchemaField().getProperties().get("explicit"));
      if (!explicit && field.getSchemaField().getOptional()) {
        return "nil";
      } else {
        CustomInfoSpec customInfo = field.getCustomInfo();
        ClassTemplateSpec fieldType;
        if (customInfo != null) {
          DataSchema refSchema = customInfo.getCustomSchema().getDereferencedDataSchema();
          fieldType = ClassTemplateSpec.createFromDataSchema(refSchema);
          String coercer = customInfo.getCoercerClass().getClassName();
          String uncoerced = toLiteral(fieldType.getSchema(), field.getSchemaField().getDefault());
          if (uncoerced == null) {
            return null;
          } else {
            // TODO(jbetz): try! should be avoided. Is there anything reasonable we can do instead
            // given that swift does not allow use to propagate errors in initializers?
            return SwiftyJSON.expr(coercer).coercerInput(SwiftyJSON.expr(uncoerced)).toSwiftCode().replaceFirst("try", "try!");
          }
        } else {
          fieldType = field.getType();
          return toLiteral(fieldType.getSchema(), field.getSchemaField().getDefault());
        }
      }
    }
docs: @param field field to build a default literal for.
  
  @return A swift source code string representing the literal value of the field default, or null
  if the field does not have a default.