code: func (r *Resolver) Resolve(v interface{}, ptr string, options ...Option) (ret interface{}, err error) {
  	if pdebug.Enabled {
  		g := pdebug.Marker("Resolver.Resolve(%s)", ptr).BindError(&err)
  		defer g.End()
  	}
  	var recursiveResolution bool
  	for _, opt := range options {
  		switch opt.Name() {
  		case "recursiveResolution":
  			recursiveResolution = opt.Value().(bool)
  		}
  	}
  
  	ctx := resolveCtx{
  		rlevel:    0,
  		maxrlevel: r.MaxRecursions,
  		object:    v,
  	}
  
  	// First, expand the target as much as we can
  	v, err = expandRefRecursive(&ctx, r, v)
  	if err != nil {
  		return nil, errors.Wrap(err, "recursive search failed")
  	}
  
  	result, err := evalptr(&ctx, r, v, ptr)
  	if err != nil {
  		return nil, err
  	}
  
  	if recursiveResolution {
  		rv, err := traverseExpandRefRecursive(&ctx, r, reflect.ValueOf(result))
  		if err != nil {
  			return nil, errors.Wrap(err, `failed to resolve result`)
  		}
  		result = rv.Interface()
  	}
  
  	return result, nil
  }
docs: // Resolve takes a target `v`, and a JSON pointer `spec`.
  // spec is expected to be in the form of
  //
  //    [scheme://[userinfo@]host/path[?query]]#fragment
  //    [scheme:opaque[?query]]#fragment
  //
  // where everything except for `#fragment` is optional.
  // If the fragment is empty, an error is returned.
  //
  // If `spec` is the empty string, `v` is returned
  // This method handles recursive JSON references.
  //
  // If `WithRecursiveResolution` option is given and its value is true,
  // an attempt to resolve all references within the resulting object
  // is made by traversing the structure recursively. Default is false