-
Notifications
You must be signed in to change notification settings - Fork 22
Labels
Description
Based on #278 and canonical/snapcraft#5060
Overview
Add an emitter method similar to the message method that takes a data structure and outputs it either as a table or as a data structure in a serialization format (MVP: as JSON, but make it expandable)
Acceptance criteria
- A method on the emitter to write structured data to stdout
- Output methods (and the ability to make more later):
- Table (possibly use tabulate, but not required)
- JSON
- Output methods (and the ability to make more later):
- Example in examples.py that can output in various formats.
- Example of one Charmcraft command using this for its
--format=jsonarg (does not need to be merged - needs to exist as a manual e2e test before we’ll merge the craft-cli PR)