json_rpc_2 4.0.0 copy "json_rpc_2: ^4.0.0" to clipboard
json_rpc_2: ^4.0.0 copied to clipboard

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

90/ 160
pub points
4.24M
downloads

We analyzed this package 13 hours ago, and awarded it 90 pub points (of a possible 160):

Passed report section
Follow Dart file conventions
30 / 30trigger folding of the section

Passed check 10/10 points: Provide a valid pubspec.yaml

Passed check 5/5 points: Provide a valid README.md

Passed check 5/5 points: Provide a valid CHANGELOG.md

Passed check 10/10 points: Use an OSI-approved license

Detected license: BSD-3-Clause.

Passed report section
Provide documentation
20 / 20trigger folding of the section

Passed check 10/10 points: 20% or more of the public API has dartdoc comments

75 out of 79 API elements (94.9 %) have documentation comments.

Some symbols that are missing documentation: error_code, json_rpc_2, json_rpc_2.Parameters.Parameters.new, json_rpc_2.RpcException.RpcException.new.

Passed check 10/10 points: Package has an example

Failed report section
Platform support
20 / 20trigger folding of the section

Passed check 20/20 points: Supports 6 of 6 possible platforms (iOS, Android, Web, Windows, macOS, Linux)

  • ✓ Android

  • ✓ iOS

  • ✓ Windows

  • ✓ Linux

  • ✓ macOS

  • ✓ Web

Failed check 0/0 points: WASM compatibility

Unable to detect compatibility with runtime wasm, and this package will not be rewarded full points in a future version of the scoring model.

See https://dart.dev/web/wasm for details.

Failed report section
Pass static analysis
0 / 50trigger folding of the section

Failed check 0/50 points: code has no errors, warnings, lints, or formatting issues

Found 28 issues. Showing the first 2:

ERROR: The argument type 'dynamic' can't be assigned to the parameter type 'int'.

lib/src/client.dart:221:24

    ╷
221 │           RpcException(response['error']['code'], response['error']['message'],
    │                        ^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵

To reproduce make sure you are using the lints_core and run dart analyze lib/src/client.dart

ERROR: The argument type 'dynamic' can't be assigned to the parameter type 'String'.

lib/src/client.dart:221:51

    ╷
221 │           RpcException(response['error']['code'], response['error']['message'],
    │                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵

To reproduce make sure you are using the lints_core and run dart analyze lib/src/client.dart

Failed report section
Support up-to-date dependencies
20 / 40trigger folding of the section

Passed check 10/10 points: All of the package dependencies are supported in the latest version

Package Constraint Compatible Latest Notes
stack_trace ^1.10.0 1.12.1 1.12.1
stream_channel ^2.1.0 2.1.4 2.1.4
Transitive dependencies
Package Constraint Compatible Latest Notes
async - 2.13.0 2.13.0
collection - 1.19.1 1.19.1
meta - 1.17.0 1.17.0
path - 1.9.1 1.9.1

To reproduce run dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides.

Passed check 10/10 points: Package supports latest stable Dart and Flutter SDKs

Failed check 0/20 points: Compatible with dependency constraint lower bounds

downgrade analysis failed failed with 17 errors:

  • ARGUMENT_TYPE_NOT_ASSIGNABLE - lib/src/client.dart:221:24 - The argument type 'dynamic' can't be assigned to the parameter type 'int'.
  • ARGUMENT_TYPE_NOT_ASSIGNABLE - lib/src/client.dart:221:51 - The argument type 'dynamic' can't be assigned to the parameter type 'String'.
  • ARGUMENT_TYPE_NOT_ASSIGNABLE - lib/src/parameters.dart:49:17 - The argument type 'dynamic' can't be assigned to the parameter type 'num'.

Run dart pub downgrade and then dart analyze to reproduce the above problem.

You may run dart pub upgrade --tighten to update your dependency constraints, see dart.dev/go/downgrade-testing for details.

Analyzed with Pana 0.23.0, Dart 3.9.4.

Check the analysis log for details.

Weekly downloads

Display as:
By versions:
106
likes
90
points
4.24M
downloads

Publisher

verified publishertools.dart.dev

Weekly Downloads

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

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

stack_trace, stream_channel

More

Packages that depend on json_rpc_2