Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json formatted structured data output #70

Closed
nishakm opened this issue Jul 19, 2018 · 1 comment
Closed

json formatted structured data output #70

nishakm opened this issue Jul 19, 2018 · 1 comment
Assignees
Labels
arch Architecture changes are needed feature new feature
Milestone

Comments

@nishakm
Copy link
Contributor

nishakm commented Jul 19, 2018

In order to convert from one form of data representation to another, it makes sense to first convert all of the data gathered by Tern into structured data output i.e. a python dictionary and then convert it into json formatted output file

  1. First figure out what data to output
  2. Create a function in content.py to create a python dictionary with that data
  3. Create a function in content.py to convert the python dictionary to a json object which can be written to a json file
@nishakm nishakm added feature new feature arch Architecture changes are needed labels Jul 19, 2018
@nishakm nishakm added this to the Release 0.2.0 milestone Jul 19, 2018
@nishakm
Copy link
Contributor Author

nishakm commented Sep 20, 2018

It might make sense to dump all of the image object's attributes and do so recursively for all the objects containing it. An example implementation could be the to_dict method in Package and ImageLayer classes.

@nishakm nishakm self-assigned this Sep 20, 2018
TileThePlane pushed a commit to TileThePlane/tern that referenced this issue Oct 1, 2018
This method returns a python dictionary representation of the DockerImage
and the derived Image class.

Resolves: tern-tools#70

Signed-off-by: TileThePlane kvonderw@uci.edu
rnjudge pushed a commit to rnjudge/tern that referenced this issue Jun 5, 2020
- Added print_json_report function to content.py
- Added switch for 'json' file in write_report function in report.py
- Added 'report.json' to constants.py as one of the report file names
- Added 'report.json' to gitignore
- Added '-J' option to write the report to a json file

Resolves tern-tools#70

Signed-off-by: Nisha K <nishak@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch Architecture changes are needed feature new feature
Projects
None yet
Development

No branches or pull requests

1 participant