che-che4z-lsp-for-cobol icon indicating copy to clipboard operation
che-che4z-lsp-for-cobol copied to clipboard

JSON format for client-server communication

Open lxpdd opened this issue 2 years ago • 0 comments

AS IS state

Currently there is a two special cases for getting copybook contents: copybook-resolve - to handle copybook request copybook-download - to handle copybook download request

And the format is not reliable, neither extensible because depends on regex rule: /^([^.]+)\.([^.]+)(\.(quiet|verbose))?\.(.+)\.([^.]+)\.([^.]+)$/ Examples of the plaintext in server->client communication:  cobol-lsp.copybook-resolve.cobFile.bookName.COBOL cobol-lsp.copybook-download.quiet.cobFile.bookName2.COBOL

Acceptance Criteria

  • No Regexp used for processing client-server messages
  • Command to resolve or download copybooks are sent in JSON format

Definition of Done

  • The story is implemented according to the description.
  • Unit testing done (Preferably by TDD approach, coverage should be at least 70%).
  • Code review done by at least one other team member.
  • Manual testing is done.
  • Documentation is added and reviewed (if needed).
  • The pull request is approved.
  • The story is merged into the development branch.
  • Tests are performed on the development branch.

Technical proposal

Data format should be change format into JSON to be more reliable, readable and extensible, it could contains such field as: {prefix, cobolFileName, copybookName, dialect, command}

lxpdd avatar Jul 18 '22 09:07 lxpdd