PackageTrack
Sign in Get early access

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 2026
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 32
  1. 4.1.0 18 Feb 2026
    Release notes
    • Forward errors within Peer when it is acting as a client.
    Open source →
  2. 4.0.0 01 May 2025
    Release notes
    • Add custom ID generator option to clients, which allows for String ids.
    • Breaking: When String ids 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.
    Open source →
  3. 3.0.3 28 Oct 2024
    Release notes
    • Require Dart 3.4
    • Move to dart-lang/tools monorepo.
    Open source →
  4. 3.0.2 15 Jun 2022
    Release notes
    • Switch to using package:lints.
    • Address a few analysis hint violations.
    • Populate the pubspec repository field.
    Open source →
  5. 3.0.1 06 May 2021
    Release notes
    • Fix a bug where a null result to a request caused an exception.
    Open source →
  6. 3.0.0 28 Apr 2021
    Release notes
    • Adds discovery API to find both a configuration and its location:
      findPackageConfigAndFile and findPackageConfigAndUri.
    • Removes support for the .packages file.
      The Dart SDK no longer supports that file, and no new .packages files
      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 readAnyConfigFile to readConfigFile, and removed
        the preferNewest parameter.
      • Same for readAnyConfigFileUri which becomes readConfigFileUri.
      • Old functions still exists as deprecated, forwarding to the new
        functions without the preferNewest argument.
        Makes PackageConfig, Package and LanguageVersion @sealed classes,
        in preparation for making them final in a future update.
    • Adds PackageConfig.minVersion to complement .maxVersion.
      Currently both are 2.
    Open source →
    Release notes
    • Migrate to null safety.
    • Accept responses even if the server converts the ID to a String.
    Open source →
  7. 2.2.2 28 Aug 2020
    Release notes
    • Fix Peer.close() throwing Bad state: Future already completed.
    Open source →
  8. 2.2.1 08 Jun 2020
    Release notes
    • Fix Peer requests not terminating when the underlying channel is closed.
    Open source →
  9. 2.2.0 20 May 2020
    Release notes
    • Added strictProtocolChecks named parameter to Server and Peer constructors. Setting this parameter to false will result in the server not rejecting requests missing the jsonrpc parameter.
    Open source →
  10. 2.1.1 21 Apr 2020
    Release notes
    • Fixed issue where throwing RpcException.methodNotFound in an asynchronous fallback handler would not result in the next fallback being executed.
    • Updated minimum SDK to Dart 2.2.0.
    Open source →
  11. 2.1.0 23 Apr 2019
    Release notes
    • Server and related classes can now take an onUnhandledError callback to notify callers of unhandled exceptions.
    Open source →
  12. 2.0.10 27 Mar 2019
    Release notes
    • Allow stream_channel version 2.x
    Open source →
  13. 2.0.9 20 Jul 2018

    Nothing published for this version

  14. 2.0.8 25 May 2018
    Release notes
    • Updated SDK version to 2.0.0-dev.17.0
    Open source →
  15. 2.0.7 17 Jan 2018
    Release notes
    • When a Client is closed before a request completes, the error sent to that request's Future now includes the request method to aid in debugging.
    Open source →
  16. 2.0.6 11 Jan 2018
    Release notes
    • Internal changes only.
    Open source →
  17. 2.0.5 06 Jan 2018
    Release notes
    • Internal changes only.
    Open source →
  18. 2.0.4 15 Feb 2017
    Release notes
    • Client.sendRequest() now throws a StateError if the client is closed while the request is in-flight. This avoids dangling Futures that will never be completed.

    • Both Client.sendRequest() and Client.sendNotification() now throw StateErrors if they're called after the client is closed.

    Open source →
  19. 2.0.3 01 Nov 2016
    Release notes
    • Fix new strong-mode warnings.
    Open source →
  20. 2.0.2 09 Aug 2016
    Release notes
    • Fix all strong-mode warnings.
    Open source →
  21. 2.0.1 14 Apr 2016
    Release notes
    • Fix a race condition in which a StateError could be top-leveled if Peer.close() was called before the underlying channel closed.
    Open source →
  22. 2.0.0 02 Feb 2016
    Release notes
    • Breaking change: all constructors now take a StreamChannel rather than a Stream/StreamSink pair.

    • Client.sendRequest() and Client.sendNotification() no longer throw StateErrors after the connection has been closed but before Client.close() has been called.

    • The various close() methods may now be called before their corresponding listen() methods.

    • The various close() methods now wait on the result of closing the underlying StreamSink. Be aware that in some circumstances StreamControllers' Sink.close() futures may never complete.

    Open source →
  23. 1.2.0 15 Sep 2015
    Release notes
    • Add Client.isClosed and Server.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 call Client.sendRequest.

    • Fix a race condition in Server where a StateError could be thrown if the connection was closed in the middle of handling a request.

    • Improve stack traces for error responses.

    Open source →
  24. 1.1.1 06 Feb 2015
    Release notes
    • Update the README to match the current API.
    Open source →
  25. 1.1.0 21 Jan 2015
    Release notes
    • Add a done getter to Client, Server, and Peer.
    Open source →
  26. 1.0.0 11 Nov 2014
    Release notes
    • Add a Client class for communicating with external JSON-RPC 2.0 servers.

    • Add a Peer class that's both a Client and a Server.

    Open source →
  27. 0.1.0 04 Jun 2014
    Release notes
    • Remove Server.handleRequest() and Server.parseRequest(). Instead, new Server() takes a Stream and a StreamSink and 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.

    Open source →
  28. 0.0.2 25 Mar 2014

    Nothing published for this version

  29. 0.0.2+1 03 Apr 2014

    Nothing published for this version

  30. 0.0.2+2 04 Apr 2014
    Release notes
    • Fix error response to include data from RpcException when not a map.
    Open source →
  31. 0.0.2+3 02 Jun 2014
    Release notes
    • Widen the version constraint for stack_trace.
    Open source →
  32. 0.0.1 21 Mar 2014

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive