diff --git a/internal/pkg/api/node/list.go b/internal/pkg/api/node/list.go index e19bd1a5..2ffa66d2 100644 --- a/internal/pkg/api/node/list.go +++ b/internal/pkg/api/node/list.go @@ -114,7 +114,7 @@ func NodeList(nodeGet *wwapiv1.GetNodeList) (nodeList wwapiv1.NodeList, err erro var buf []byte if nodeGet.Type == wwapiv1.GetNodeList_JSON { - buf, _ = json.Marshal(nodeResp) + buf, _ = json.MarshalIndent(nodeResp, "", " ") } if nodeGet.Type == wwapiv1.GetNodeList_YAML { buf, _ = yaml.Marshal(nodeResp) diff --git a/internal/pkg/api/profile/list.go b/internal/pkg/api/profile/list.go index 697ef8a3..0d833573 100644 --- a/internal/pkg/api/profile/list.go +++ b/internal/pkg/api/profile/list.go @@ -55,7 +55,7 @@ func ProfileList(ShowOpt *wwapiv1.GetProfileList) (profileList wwapiv1.ProfileLi profileMap[profile.Id.Get()] = profile } - buf, _ := json.Marshal(profileMap) + buf, _ := json.MarshalIndent(profileMap, "", " ") profileList.Output = append(profileList.Output, string(buf)) } else { profileList.Output = append(profileList.Output,