Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Add JSON format to table printer#695

Merged
bryanl merged 1 commit intoksonnet:masterfrom
bryanl:693-json-output
Jul 7, 2018
Merged

Add JSON format to table printer#695
bryanl merged 1 commit intoksonnet:masterfrom
bryanl:693-json-output

Conversation

@bryanl
Copy link
Member

@bryanl bryanl commented Jul 5, 2018

This PR adds JSON output to the existing table printer and updates all
actions which use the table printer.

JSON tables are printed out like:

{
  "kind": "moduleList",
  "data": [
    {"module": "/"},
    {"module": "a"},
    {"module": "a.b"}
  ]
}

Where:

  • kind is the kind of data in the table
  • data contains the table rows matched to the header

Fixes #693

Signed-off-by: bryanl bryanliles@gmail.com

This PR adds JSON output to the existing table printer and updates all
actions which use the table printer.

JSON tables are printed out like:

```json
{
  "kind": "moduleList",
  "data": [
    {"module": "/"},
    {"module": "a"},
    {"module": "a.b"}
  ]
}
```

Where:

* `kind` is the kind of data in the table
* `data` contains the table rows matched to the header

Fixes ksonnet#693

Signed-off-by: bryanl <bryanliles@gmail.com>
@bryanl bryanl requested a review from a team July 5, 2018 02:29
@bryanl bryanl added this to the 0.12.0 milestone Jul 5, 2018
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1127

  • 184 of 184 (100.0%) changed or added relevant lines in 20 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 71.126%

Totals Coverage Status
Change from base Build 1126: 0.3%
Covered Lines: 11548
Relevant Lines: 16236

💛 - Coveralls

@bryanl bryanl merged commit d670132 into ksonnet:master Jul 7, 2018
@bryanl bryanl deleted the 693-json-output branch July 7, 2018 01:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants