adding a basic --json switch
structure fixup