Constructor: refactor to simplify

- Return early.
- One less level of if blocks
- Byte comparison is just enough to compare to '/'
1 file changed
tree: 782ad98908e5843f3ebbed31f740ee29a6e839fa
  1. LICENSE-APACHE-2.0.txt
  2. pointer.go
  3. pointer_test.go
  4. README.md
README.md

gojsonpointer

An implementation of JSON Pointer - Go language

References

http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07

Note

The 4.Evaluation part of the previous reference, starting with ‘If the currently referenced value is a JSON array, the reference token MUST contain either...’ is not implemented.