Add JSONPointer support
Summary: Allow retrieving sub-tree from folly::dynamic using JSON pointer syntax (RFC6901). This adds new overload for the `get_ptr` method, retrieving raw pointer to a sub-tree, or returning `nullptr` if element is not found. The `folly::dynamic` implementation traverses the path specified by JSON pointer string dynamically every time, since the underlying object may change, and JSON pointer traversal depends on the underlying object structure. E.g. "123" could be a key name for `dynamic::object` and index in `dynamic::array`. Reviewed By: yfeldblum Differential Revision: D6790515 fbshipit-source-id: bb6ea10acb83673e87721cf1e5a02506b44bb273
Showing
folly/json_pointer.cpp
0 → 100644
folly/json_pointer.h
0 → 100644
Please register or sign in to comment