feat(value): implement RFC6901 JSON Pointer
Add a method `pointer(&str)` to `Value`. Deprecate `lookup(&str)`.
Bump version to 0.7.1.
Closes#9
Notes:
* It should be possible to add a `pointer_mut(&str)` method to Value. This would allow to add and modify values. (Maybe even a delete method) I failed to add such a method because of borrow checker.
* Should [RFC6902 JSON Patch](https://tools.ietf.org/html/rfc6902) be implemented or is this something for a separate crate? (Patch is based on Pointer)
This updates json breakage from latest serde master. Of note is the
removal of `test_missing_fmt_renamed_field` which relied on a feature
that is being removed.
Additionally,
- Adds .cargo/config for travis to use master of serde
- reverts dependencies with specific git revisions
Mappings from visit_* to de/serialize_* should be self explanatory.
[serde(deny_unknown_fields)] was added to a test struct since it was
checking for denial. A couple of error types were added to support new
serde de::value::Error variants. Finally, there are a bunch of throwaway
changes pinning the serde version to a 0.7 commit. These should be
removed once 0.7 lands in favor of a crates.io semver spec.
This resolves#22, resolves#29, and resolves#30.
* The reported error code is now `MissingField`, not `ExpectedSomeValue`.
* A missing `()` field now causes a `MissingField` error.
* A missing `Vec<_>` field now causes a `MissingField` error.
Tests have been updated to check these cases.
* `parse_stream` removed in favor of direct `JSONStream` usage;
* truncated input no longer silently ignored;
* added test for errors;
* style violation fixed.
Many modern web APIs return their data as stream of (sometimes newline
delimited) JSON values. This commits add handy function `parse_stream`
that returns Iterator over parsed values.