FLUTTER ECOSYSTEM

json_rpc_2

Utilities to write a client or server using the JSON-RPC 2.0 spec.

Latest version
4.1.0
30-day downloads
7.9M
Likes
111
Pub points
70

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

A Dart package providing utilities for implementing clients and servers that adhere to the JSON-RPC 2.0 specification. It enables structured, stateless communication over transport layers like WebSocket or HTTP, supporting method calls, notifications, and error handling. The package is designed for developers building RPC-based services or integrating with existing JSON-RPC endpoints. It offers a clean API for encoding and decoding messages, managing requests and responses, and handling asynchronous operations. Ideal for tools, IDEs, or backend services requiring remote procedure calls.

Use cases
  • Building RPC clients for external APIs
  • Implementing server-side JSON-RPC endpoints
  • Integrating with language servers (e.g., LSP)
  • Enabling real-time communication in web and mobile apps
  • Creating tooling for development environments
Key features
  • Supports JSON-RPC 2.0 protocol
  • Flexible transport layer integration
  • Built-in request/response handling
  • Error and notification support
  • Asynchronous message processing
Suitable for
  • Developers building language servers
  • Tooling and IDE extensions
  • Backend services needing remote calls
  • Cross-platform applications using RPC
  • Real-time data exchange systems
Considerations
  • Requires understanding of JSON-RPC 2.0 spec
  • Not suitable for simple HTTP APIs
  • Needs proper error handling in async flows
  • Limited documentation beyond core functionality
  • Best used with established transports like WebSocket
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add json_rpc_2

Categories

Dependencies

Dependency list 2 items

Source repository

Related projects