Skip to content

RPC message parser can support arbitrary whitespace such as '\n' within and between JSON RPC messages #1

Description

@tegefaulkes

Specification

Currently the agnostic RPC message parser separates the messages based on the}{ boundry., which makes it difficult to read messages since they are in a single line.

The objective is to improve readability by formatting a message with newlines and whitespaces, and ensuring that the parser is able to handle these characters.

// OLD
{some: 'message'}{other: 'message'}...

// new
{some: 'message'}
{other: 'message'}
...

This should be possible by adjusting the separator parameter which should be able to discard the newline and other whitespace characters when constructing the JsonStreamParser. (Constructing the stream)

Additional context

Related MatrixAI/Polykey#249
Related MatrixAI/Polykey#498

Tasks

  • 1. Format the message stream to be human-readable by incorporating newlines and whitespace.
  • 2. Modify parser to discard ' ', \n, \t, \r, \f, \v, \u200B, \u00A0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions