Project

General

Profile

Actions

Task #3392

closed

Revision of JPath library

Added by Jan Mach about 7 years ago. Updated 4 days ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Development - Core
Target version:
Start date:
03/25/2017
Due date:
% Done:

0%

Estimated time:
To be discussed:

Description

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:

  1. Writing of simple rules in filtering expressions, for example:
        Source.IP4 in [192.168.0.0/24, 192.168.0.0/24]
# Simple message modifications based on the key => value rules, for example:
        "Source[1].Type[*]" = "source type tag" 

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.

Documentation must contain examples for common use cases.


Related issues

Related to Mentat - Task #3393: Revision of pynspect libraryClosedJan Mach03/25/2017

Actions
Actions

Also available in: Atom PDF