SkillAgentSearch skills...

Hessian.NET

The Hessian 2.0 binary protocol serialization

Install / Use

/learn @VlaTo/Hessian.NET
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

A Hessian binary protocol

Build Status Nuget Versions

This is implementation of Hessian 2.0 Web Service Protocol serializer for the .NET in the C#.

Description

This implementation is binary protocol serializer. It can serialize/deserialize simple value-types and complex object graphs. For example, we has class:

[DataContract]
public sealed class DummyClass {
  [DataMember(Name = "field")]
  public string Field1
  {
    get;
    set;
  }
}

Serializing the object graph

var graph = new DummyClass
{
  Field1 = "Lorem Ipsum"
};

var settings = new HessianSerializerSettings();
var serializer = new DataContractHessianSerializer(typeof(DummyClass), settings);

using (var stream = new MemoryStream())
{
  serializer.WriteObject(stream, graph);
}

Deserializing the object graph

var settings = new HessianSerializerSettings();
var serializer = new DataContractHessianSerializer(typeof(DummyClass), settings);

// your data retrieval goes here
var packet = new byte[...];

using (var stream = new MemoryStream(packet))
{
  var graph = (DummyClass) serializer.ReadObject(stream);
}

Links

View on GitHub
GitHub Stars7
CategoryDevelopment
Updated6y ago
Forks3

Languages

C#

Security Score

55/100

Audited on Aug 12, 2019

No findings