Skip to content

VlaTo/Hessian.NET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

The Hessian 2.0 binary protocol serialization

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages