code: public static Document convertValuesWithMismatchedTypes( Document original,
                                                               SchemaLibrary.Results results ) {
          if (results == null || !results.hasProblems()) return original;
  
          // Create a conversion object for each of the field values with mismatched (but convertable) types ...
          LinkedList<Conversion> conversions = new LinkedList<>();
          for (SchemaLibrary.Problem problem : results) {
              if (problem instanceof SchemaLibrary.MismatchedTypeProblem) {
                  conversions.add(new Conversion((SchemaLibrary.MismatchedTypeProblem)problem));
              }
          }
          if (conversions.isEmpty()) return original;
  
          // Transform the original document, starting at the first level ...
          return convertValuesWithMismatchedTypes(original, 0, conversions);
      }
docs: Return a copy of the supplied document that contains converted values for all of the fields (including in the nested
  documents and arrays) that have values that are of the wrong type but can be converted to be of the correct type.
  <p>
  This method does nothing and returns the original document if there are no changes to be made.
  </p>
  
  @param original the original document that contains fields with mismatched values; may not be null
  @param results the results of the {@link SchemaLibrary#validate(Document, String) JSON Schema
  validation} and which contains the {@link SchemaLibrary.MismatchedTypeProblem type mismatch errors}
  @return the document with all of the conversions made the its fields and the fields of nested documents, or the original
  document if there are no conversions to be made; never null