Skip to content

Releases: CXuesong/JsonRpc.Standard

v0.5.4

20 Jun 17:27
Compare
Choose a tag to compare
  • Use DisposeAsync across the libraries since .NET Standard 2.1 (.NET Core 3.0).

CXuesong.JsonRpc.AspNetCore

  • Use asynchronous overloads to access HTTP request/response (#13)
    • Thus ASP.NET Core 3+ will not complain about you are using synchronous HTTP stream overloads.
    • You will not need to enable AllowSynchronousIO in your config.
  • Use HTTP 200 status code for error JSON RPC response. (#14)

v0.5.3

21 Mar 12:13
Compare
Choose a tag to compare
  • Updated package dependencies and target platforms, so we can move on into the future :-)

v0.5.2

11 May 09:06
Compare
Choose a tag to compare
  • Workaround for JsonRpcContractResolver on Mono runtime. (#9 #10)
    • Need to opt-in the fix only when we can detect the platform as Mono
  • ByLineTextMessageWriter should not add '\n' around Delimiters. This behavior is consistent with ByLineTextMessageReader since v0.5.0.

v0.5.1

27 Apr 08:40
Compare
Choose a tag to compare
  • Use ReadAsync instead of ReadLineAsync to enable real cancellation in ByLineTextMessageReader on .NET Core 2.1+. (#8)
    • Do not wait for ongoing ReadDirectAsync in Dispose if underlying TextWriter does not support cancellation (e.g. on .NET Core 2.0- or .NET Framework 4.8-).

v0.5.0

21 Apr 16:35
Compare
Choose a tag to compare

Bug fix

  • Take the reader/writer semaphore only once in ByLineTextMessageReader.Dispose and ByLineTextMessageWriter.Dispose to prevent 1s delay. (#8)

Major changes

  • Renamed package JsonRpc.Standard to JsonRpc.Commons.
    • This is what I wanted since 2018.
  • Renamed namespace JsonRpc.Standard.xxx to JsonRpc.xxx.
    • Moved Message and related classes into JsonRpc.Messages namespace.
  • Enabled Source Link support. You should be able to see source code downloaded from GitHub when debugging into JsonRpc.Standard library.

v0.4.3

06 Apr 16:08
Compare
Choose a tag to compare
  • Use SHFB to cleanup the XML documentation so you will have better intellisence experience when consuming the following packages.

JsonRpc.WebSockets

  • Introduce JsonRpc.WebSockets! Now you may either serve JSON-RPC services or make JSON-RPC calls over WebSocket. (#6)

JsonRpc.Streams

  • Fixed a bug that may cause StreamRpcServerHandlerOptions.ConsistentResponseSequence actually having no effect.
  • Reduced ObjectDisposedExceptions that may raise if
    there is another Exception (e.g. TaskCancelledException) triggered while MessageReader is pulling the JSON-RPC message.

JsonRpc.AspNetCore

  • Make AspNetCoreFeature public.

v0.4.2

06 May 05:14
Compare
Choose a tag to compare

Bug fix: Now server-side request cancellation works when ConsistentResponseSequence and SupportsRequestCancellation enabled at the same time (#5)

v0.4.1

17 Mar 06:51
Compare
Choose a tag to compare
  • ClrExceptionErrorData.FromException supports opt-out stack trace,
    • However, the default (and un-configurable) behavior of JsonRpcServiceHost is to include the stack trace.
  • ClrExceptionErrorData FromException can automatically flatten JsonRpcRemoteException.RemoteException as its InnerException
    • This can be helpful to maintain as much information as we can, especially when we are relaying JSON RPC operations through the channels.
  • ByLineTextMessageReader/ByLineTextMessageWriter will wait for the ongoing asynchronous operation to finish before disposing its underlying StreamReader/StreamWriter.

v0.4.0

31 Dec 16:11
Compare
Choose a tag to compare
  • SingleFeatureCollection.Get<T> should accept feature queries of base type of T aside from T itself.

The following packages have not been changed since the last release, thus are not included in this version of release.

  • CXuesong.JsonRpc.AspNetCore
  • CXuesong.JsonRpc.Http

v0.4-int0

22 Sep 07:52
Compare
Choose a tag to compare
v0.4-int0 Pre-release
Pre-release
  • Applied [Serializable] and [SecurityCritical] attributes on exception classes.

Contracts

  • Server-side by-position argument support. See JsonRpcMethodBinder.TryBindToMethod. (#3)
  • Added IJsonRpcMethodBinder.BindParameters and IJsonRpcRequestMarshaler to convert the CLR method arguments from/to JSON RPC request arguments.
    • Thus removed JsonRpcMethod.Marshal and JsonRpcMethod.UnmarshalArguments
  • Added IsOptional and DefaultValue properties in JsonRpcParameterAttribute. You may specify a CLR parameter is optional via attribute without putting it to the back of the argument list now. See the usage demo in TestJsonRpcService.cs.

Server

  • Now undefined argument value in the JSON RPC request will be treated as "missing", i.e. default value of the corresponding parameter is used. Note the missing item in the JSON array (e.g. [1, 2, , 3]) is treated as undefined.

JsonRpcProxyBuilder

  • Moved JsonRpcProxyBuilder into a separate package CXuesong.JsonRpc.DynamicProxy.
  • Now you can use the proxy builder to implement the abstract methods (attributed with JsonRpcMethodAttribute) in an abstract class.
  • Add MessageReaderException, which are intended to be thrown by MessageReader implementations. They used to throw JsonRpcException, which is incorrect.
  • Invoke-and-forget for client-side notifications implementation.
    • This could reduce the chance of deadlocks caused by sync-wait in async method body.

Notes

The following packages have not been changed since the last release, thus are not included in this version of release.

  • CXuesong.JsonRpc.AspNetCore
  • CXuesong.JsonRpc.Http