docs: def json(src, dest=False, shift=4):
      """Beautify JSON
  
      Args:
          src: JSON string or path-to-file with text to beautify (mandatory)
          dest: path-to-file to save beautified json string; (optional)
                if file doesn't exist it is created automatically;
                if this arg is skept function returns string
          shift: can be either integer or string (optional)
                  1) if shift is int: number of spaces in tab, for example shift=8
                  <a>
                          <b></b>
                  </a>
                 2) if shift is string: pattern (for example shift='....' )
                  <a>
                  ....<b></b>
                  </a>
  
      Returns: 1) beautified JSON string if dest is not provided
               2) length of saved file if dest is provided
  
      Example:
              json('path/to/file.json')
              json('path/to/file.json', 'path/to/save/result.json')
              json('path/to/file.json', 8)
              json('path/to/file.json', '____')
              json('path/to/file.json', 'path/to/save/result.json', 2)
      """
      if not dest:
          return _json(_text(src)) # returns string
      else:
          if type(dest) is int:  # dest is skept, custom pattern provided at dist place
              return _json(_text(src), dest)
          else:
              with open(dest, 'w') as f2:
                  return f2.write(_json(_text(src), shift))