I am working on a system to output a JSON file, and I use Python to parse the data and display it in the user interface (PySide). Now I would like to add filtering to this system, and I think, instead of writing a query system, if there was JSON (in Python), it would save me a lot of development time. I found this thread:
Is there a query language for JSON?
but it is more for the web system. Any ideas on the Python equivalent?
EDIT [for clarity]:
The format that I will generate is as follows:
{ "Operations": [ { "OpID": "0", "type": "callback", "stringTag1": "foo1", "stringTag2": "FooMsg", "Children": [...], "value": "0.000694053" }, { "OpID": "1", "type": "callback", "stringTag1": "moo1", "string2": "MooMsg", "Children": [...], "value": "0.000468427" } }
Where "Children" can be nested arrays of the same thing (other operations). The system will be built so that users can add their own tags to the data. My hope was to have a query system that would allow users to define their own "filters", hence the question about the query language. If there was something that would allow me to do something like "SELECT * WHERE" type "==" callback "and return the required operations, that would be great.
Interestingly, the Pync proposal is interesting, I will give this look.
source share