package wsjson
import "github.com/coder/websocket/wsjson"
Package wsjson provides helpers for reading and writing JSON messages.
Index ¶
- func Read(ctx context.Context, c *websocket.Conn, v interface{}) error
- func Write(ctx context.Context, c *websocket.Conn, v interface{}) error
Functions ¶
func Read ¶
Read reads a JSON message from c into v. It will reuse buffers in between calls to avoid allocations.
func Write ¶
Write writes the JSON message v to c. It will reuse buffers in between calls to avoid allocations.
Source Files ¶
- Version
- v1.8.13 (latest)
- Published
- Mar 14, 2025
- Platform
- windows/amd64
- Imports
- 7 packages
- Last checked
- now –
Tools for package owners.