code: public static String serializeFromField(final Object containingObject, final String fieldName,
              final int indentWidth, final boolean onlySerializePublicFields) {
          // Don't need to resolve types during serialization
          final ClassFieldCache classFieldCache = new ClassFieldCache(/* resolveTypes = */ false,
                  onlySerializePublicFields);
          return serializeFromField(containingObject, fieldName, indentWidth, onlySerializePublicFields,
                  classFieldCache);
      }
docs: Recursively serialize the named field of an object, skipping transient and final fields.
  
  @param containingObject
  The object containing the field value to serialize.
  @param fieldName
  The name of the field to serialize.
  @param indentWidth
  If indentWidth == 0, no prettyprinting indentation is performed, otherwise this specifies the
  number of spaces to indent each level of JSON.
  @param onlySerializePublicFields
  If true, only serialize public fields.
  @return The object graph in JSON form.
  @throws IllegalArgumentException
  If anything goes wrong during serialization.