Results 1 to 2 of 2

Thread: Serialized messages, and Json structures

  1. #1
    Join Date
    Oct 2010
    Posts
    8

    Default Serialized messages, and Json structures

    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.
    Attached Files Attached Files

  2. #2
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    Thanks. The SimpleMessageConverter already handles .NET serialized objects, delegating down to the base NMS library to convert
    Code:
            protected virtual IObjectMessage CreateMessageForSerializable(
                object objectToSend, ISession session)
            {
                return session.CreateObjectMessage(objectToSend);
            }
    and
    Code:
            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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •