XStream
  1. XStream
  2. XSTR-73

Does not serialize multidimensional arrays

    Details

    • Type: Task Task
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.1
    • Component/s: Converters
    • Labels:
      None

      Description

            • Posted by Philipp Kratochvil to mailing list ***

      i've writen a small class, to save an three dimensional array using XStream:

      ---------------------------------------------------------------
      public class Xstreamtest {

      public Xstreamtest() {
      }

      public static void main(String args[])

      { XStream xs = new XStream(); String xml = xs.toXML(new wunschzeiten()); System.out.println("xml = " + xml); wunschzeiten wz = (wunschzeiten) xs.fromXML(xml); }

      static class wunschzeiten {
      boolean[][][] wunschzeiten = new boolean[5][5][5];

      public void init() {
      for (int i = 0; i < wunschzeiten.length; i++) {
      boolean[][] booleans = wunschzeiten[i];
      for (int j = 0; j < booleans.length; j++) {
      boolean[] aBoolean = booleans[j];
      for (int k = 0; k < aBoolean.length; k++)

      { boolean b = aBoolean[k]; b = true; }

      }
      }
      }
      }
      }
      ---------------------------------------------------------------

      when running this code above, i get an ConversionException.

      Details:

      com.thoughtworks.xstream.converters.ConversionException: unexpected character in markup [ (position: START_TAG seen ...<wunschzeiten>\n <[... @3:7)
      ---- Debugging information ----
      required-type : [[[Z
      cause-message : unexpected character in markup [ (position: START_TAG seen ...<wunschzeiten>\n <[... @3:7)
      class : Xstreamtest$wunschzeiten
      message : unexpected character in markup [ (position: START_TAG seen ...<wunschzeiten>\n <[... @3:7)
      line number : 3
      path : /Xstreamtest-wunschzeiten/wunschzeiten
      cause-exception : com.thoughtworks.xstream.io.StreamException
      ------------------------------------------------------------------

      i wanted to use XStream for a big project where i often use multidimensional arrays, and i always run into this kind of exception.....

      any help would be great,
      thanks,

      Philipp Kratochvil

        People

        • Assignee:
          Unassigned
          Reporter:
          Joe Walnes
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: