PDA

View Full Version : Serialized messages, and Json structures



geoffma
01-05-2011, 02:56 AM
Attached are two converters to enable the .Net implementation pass around Serialized C# objects (like the Java version does), and Json structures where there are nested objects which are defined as abstract of object types.

Mark Pollack
02-25-2011, 02:48 PM
Hi,

Thanks. The SimpleMessageConverter already handles .NET serialized objects, delegating down to the base NMS library to convert


protected virtual IObjectMessage CreateMessageForSerializable(
object objectToSend, ISession session)
{
return session.CreateObjectMessage(objectToSend);
}

and


protected virtual object ExtractSerializableFromMessage(
IObjectMessage message)
{
return message.Body;
}


I don't know if the contentType property is set in this case, I'd have to check.

The JSON one is quite useful, we should add this to spring.net distribution. Can you raise and JIRA issue for this please?

Thanks for the feedback, much appreciated!

Mark