Project

General

Profile

Task #3392

Updated by Jan Mach over 7 years ago

Because *mentat-inspector.py* is currently being heavily used and expectations are getting bigger, it would be wise to perform revision of the library and finish the implementation, so that everything works as expected and *mentat-inspector.py* delivers. 

 JPath is simplified version of JSONPath and can be used to addressing nodes within arbitrary data structure composed of dict-like and list-like objects. Basically it can be used for any data structure of objects implementing Python list and/or dict interface. 

 The motivation for implementing this module were following two use cases: 

     # Writing of simple rules in filtering expressions, for example: 

 <pre> 
         

         Source.IP4 in [192.168.0.0/24, 192.168.0.0/24] 
 </pre> 

     # Simple message modifications based on the key => value rules, for example: 

 <pre> 
         

         "Source[1].Type[*]" = "source type tag" 
 </pre> 

 The obvious first choice as a solution was the *jsonpath-rw* library. The full JSONPath however seems to be too big of a gun for our needs and in some cases it could even enable users to cut branch they are sitting on. For this reason we have designed this simplified version with only basic features.

Back