code: def save_json(self, jsonfn=None, pretty=True):
          
          if jsonfn is None:
              jsonfn = os.path.join(os.getcwd(), 'units.json')
          #
          jsondump = None
          sort_keys = False
          indent = 0
          if pretty:
              sort_keys = True
              indent = 4
          jsondump = json.dumps(self.units, sort_keys=sort_keys, indent=indent)
          #
          with open(jsonfn, 'w') as f:
              f.write(jsondump)
              return True
          return False
docs: Write a .json file with the units tree
          jsonfn='path/file.name' default os.getcwd() + 'units.json'
          pretty=True use JSON dumps pretty print for human readability