json_rpc_2
Utilities to write a client or server using the JSON-RPC 2.0 spec.
4.1.0
7.0M downloads/mo
#89 most downloaded on pub.dev
dart-lang/tools
What this package is like to depend on
Last release 6 months ago
18 Feb 2026
Release timing varies
gaps range from 8 days to 2.4 years
Most releases are documented
notes for 28 of 32 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
32 releases · first in 2014
1 release in the last 12 months
see the full history below
Release timeline
32 releases · Mar 2014 to Feb 2026Releases
latest 32-
4.1.018 Feb 2026 -
4.0.001 May 2025Release notes
Open source →- Add custom ID generator option to clients, which allows for
Stringids. - Breaking: When
Stringids are present in a response, we no longer automatically try to parse them as integers. This behavior was never a part of the spec, and is not compatible with allowing custom ID generators.
- Add custom ID generator option to clients, which allows for
-
3.0.328 Oct 2024 -
3.0.215 Jun 2022Release notes
Open source →- Switch to using
package:lints. - Address a few analysis hint violations.
- Populate the pubspec
repositoryfield.
- Switch to using
-
3.0.106 May 2021 -
3.0.028 Apr 2021Release notes
Open source →- Adds discovery API to find both a configuration and its location:
findPackageConfigAndFileandfindPackageConfigAndUri. - Removes support for the
.packagesfile.
The Dart SDK no longer supports that file, and no new.packagesfiles
will be generated.
Since the SDK requirement for this package is above 3.0.0,
no supporting SDK can use or generate.packages. - Simplifies API that no longer needs to support two separate files.
- Renamed
readAnyConfigFiletoreadConfigFile, and removed
thepreferNewestparameter. - Same for
readAnyConfigFileUriwhich becomesreadConfigFileUri. - Old functions still exists as deprecated, forwarding to the new
functions without thepreferNewestargument.
MakesPackageConfig,PackageandLanguageVersion@sealedclasses,
in preparation for making themfinalin a future update.
- Renamed
- Adds
PackageConfig.minVersionto complement.maxVersion.
Currently both are2.
Release notes
Open source →- Migrate to null safety.
- Accept responses even if the server converts the ID to a String.
- Adds discovery API to find both a configuration and its location:
-
2.2.228 Aug 2020 -
2.2.108 Jun 2020Release notes
Open source →- Fix
Peerrequests not terminating when the underlying channel is closed.
- Fix
-
2.2.020 May 2020Release notes
Open source →- Added
strictProtocolChecksnamed parameter toServerandPeerconstructors. Setting this parameter to false will result in the server not rejecting requests missing thejsonrpcparameter.
- Added
-
2.1.121 Apr 2020Release notes
Open source →- Fixed issue where throwing
RpcException.methodNotFoundin an asynchronous fallback handler would not result in the next fallback being executed. - Updated minimum SDK to Dart
2.2.0.
- Fixed issue where throwing
-
2.1.023 Apr 2019Release notes
Open source →Serverand related classes can now take anonUnhandledErrorcallback to notify callers of unhandled exceptions.
-
2.0.1027 Mar 2019 -
2.0.920 Jul 2018Nothing published for this version
-
2.0.825 May 2018 -
2.0.717 Jan 2018Release notes
Open source →- When a
Clientis closed before a request completes, the error sent to that request'sFuturenow includes the request method to aid in debugging.
- When a
-
2.0.611 Jan 2018 -
2.0.506 Jan 2018 -
2.0.415 Feb 2017Release notes
Open source →-
Client.sendRequest()now throws aStateErrorif the client is closed while the request is in-flight. This avoids danglingFutures that will never be completed. -
Both
Client.sendRequest()andClient.sendNotification()now throwStateErrors if they're called after the client is closed.
-
-
2.0.301 Nov 2016 -
2.0.209 Aug 2016 -
2.0.114 Apr 2016Release notes
Open source →- Fix a race condition in which a
StateErrorcould be top-leveled ifPeer.close()was called before the underlying channel closed.
- Fix a race condition in which a
-
2.0.002 Feb 2016Release notes
Open source →-
Breaking change: all constructors now take a
StreamChannelrather than aStream/StreamSinkpair. -
Client.sendRequest()andClient.sendNotification()no longer throwStateErrors after the connection has been closed but beforeClient.close()has been called. -
The various
close()methods may now be called before their correspondinglisten()methods. -
The various
close()methods now wait on the result of closing the underlyingStreamSink. Be aware that in some circumstancesStreamControllers'Sink.close()futures may never complete.
-
-
1.2.015 Sep 2015Release notes
Open source →-
Add
Client.isClosedandServer.isClosed, which make it possible to synchronously determine whether the connection is open. In particular, this makes it possible to reliably tell whether it's safe to callClient.sendRequest. -
Fix a race condition in
Serverwhere aStateErrorcould be thrown if the connection was closed in the middle of handling a request. -
Improve stack traces for error responses.
-
-
1.1.106 Feb 2015 -
1.1.021 Jan 2015 -
1.0.011 Nov 2014Release notes
Open source →-
Add a
Clientclass for communicating with external JSON-RPC 2.0 servers. -
Add a
Peerclass that's both aClientand aServer.
-
-
0.1.004 Jun 2014Release notes
Open source →-
Remove
Server.handleRequest()andServer.parseRequest(). Instead,new Server()takes aStreamand aStreamSinkand uses those behind-the-scenes for its communication. -
Add
Server.listen(), which causes the server to begin listening to the underlying request stream. -
Add
Server.close(), which closes the underlying request stream and response sink.
-
-
0.0.225 Mar 2014Nothing published for this version
-
0.0.2+103 Apr 2014Nothing published for this version
-
0.0.2+204 Apr 2014 -
0.0.2+302 Jun 2014 -
0.0.121 Mar 2014Nothing published for this version