We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba3f106 commit d454a0dCopy full SHA for d454a0d
1 file changed
jsonpointer.go
@@ -53,9 +53,14 @@ func New(tokens ...string) Pointer {
53
return NewFromStrings(tokens)
54
}
55
56
-// From accepts a string, trims any leading '#' and returns str as a Pointer as
57
-// well as any validation errors.
+// Deprecated: use Parse instead.
58
func From(ptr string) (Pointer, error) {
+ return Parse(ptr)
59
+}
60
+
61
+// Parse accepts a string, trims any leading '#' and returns str as a Pointer as
62
+// well as any validation errors.
63
+func Parse(ptr string) (Pointer, error) {
64
if len(ptr) == 0 {
65
return Root, nil
66
0 commit comments