• Petr Lapukhov's avatar
    Add JSONPointer support · 6c653dc9
    Petr Lapukhov authored
    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
    6c653dc9
CMakeLists.txt 27.6 KB