Hi all!
I just want to share with you the JsonData package, which I have been developing every now and then and I find very useful on my workflows.
JsonData is a set of custom nodes to handle data using json-like structures. There is more info on the GitHub Wiki, but in essence it is based on the use of Dictionaries and displaying them as json structures.
Besides the basic methods to create, get values or add/remove keys, the package also includes nodes like merge, filter by values of a given key or sort them by values.
There are also two key capabilities built in the objects:
- JsonOptions to determine how to handle duplicated keys:
- None: Default value, which throws an exception.
- Update: Which updates the value for the already existing key.
- Combine: Creates a JsonArray object and combines both values
- ‎Easy creation of nested structures by providing keys concatenated by dots (
nesting
istrue
by default).
Finally, it also comes with utilities to parse, read and write from/to json, XML and CSV, which covers most of the key data sharing formats. In this example I used Read.FromXMLFile
to parse and query a .dyn file for a particular python script, and run it from another file.
Hopefully you´ll find it as useful as I do. It might be a small contribution to the Dynamo community, but it is exactly the essence of Dynamo, any bit counts! Besides, it has been quite fun to develop