MCPcopy Create free account
hub / github.com/modelcontextprotocol/typescript-sdk / deserializeMessage

Function deserializeMessage

src/shared/stdio.ts:33–35  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

31}
32
33export function deserializeMessage(line: string): JSONRPCMessage {
34 return JSONRPCMessageSchema.parse(JSON.parse(line));
35}
36
37export function serializeMessage(message: JSONRPCMessage): string {
38 return JSON.stringify(message) + '\n';

Callers 1

readMessageMethod · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…