XStream
  1. XStream
  2. XSTR-322

Urgent Help needed for Serialization /Externalization

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • JDK version and platform:
      1.5

      Description

      Hello Guys,

      We plan to convern the object to xml using Xstream

      Issue is We have object which are instance of Externalizable so when i try to use method toxml it use java Externalization

      (readExternal and writeExternal method ) to convert it to xml ...

      But if i conver that to Serializable object meaining remove Externalization from object defintion ,it use the default java

      serialization to convert it to xml

      For someone reason i want toXML method to alway use Serialization version to convert to xml and not Exteranlization ..
      I cannot change my objects definition as there are 1000 of classses ...

      Is there a way in xstream that would allow me to do something like

      Xstream xstream=new Xstream(DO NOT use ReadExternal and WriteExternal)
      xstream.toXML(Exteranlizableobj)

      so that i get output as

      <object)
      <_fieldA>1000</_fieldA>
      </object>

      INSTEAD OF

      <object)
      <int>1000</int>
      </object>

      This issue is extremely important to us so please help me out in solving this problem...

      Regards
      Mahesh

        People

        • Assignee:
          Unassigned
          Reporter:
          Mahesh
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: