amitools icon indicating copy to clipboard operation
amitools copied to clipboard

WIP: JSON output for commands

Open ryanm101 opened this issue 4 years ago • 2 comments

  • Methods added for Partition Info as JSON

ryanm101 avatar Mar 24 '20 08:03 ryanm101

I really like the idea of json output... From the implementation side I'd prefer to have a generic approach... I.e. the Python objects are inspected by a json exporter or convert themselves to dicts and then the json conversion takes place. This allows us to write a single json dumper that works on all structures...

cnvogelg avatar Apr 07 '20 19:04 cnvogelg

I thought about the exporter but it would have to be 'smart' because it would need to handle types such has size in MB etc.

The self conversion i liked the most and thought about using the __str__() method to return a JSON string which could then be decoded.

The current implementation is meant as a 'phase 1' to get naming, and patterns working without breaking existing returns

ryanm101 avatar Apr 12 '20 00:04 ryanm101

It took quite a while for this feature: but finally its here: a2850a8

cnvogelg avatar Sep 30 '22 08:09 cnvogelg