XStream
  1. XStream
  2. XSTR-453

jettison. JSONException while parsing arrays.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: IO
    • Labels:
      None

      Description

      While parsing [{attr:{id:1098, displayTitle:"fdgdg", active:false, mandatoryFlag:false, displayTag:1, validatorType:1}}] array with Jettison, exception is thown:
      org.codehaus.jettison.json.JSONException: A JSONObject text must begin with '{' at character 1 of [{attr:{id:1098, displayTitle:"fdgdg", active:false, mandatoryFlag:false, displayTag:1, validatorType:1}}]

      Jettison doesn't have such ability to parse root's arrays now. Just objects. From code sources of org.codehaus.jettison.mapped.MappedXMLInputFactory:

      try

      { JSONObject root = new JSONObject(tokener); return new MappedXMLStreamReader(root, convention); }

      catch (JSONException e)

      { e.printStackTrace(); throw new XMLStreamException(e); }

      Will it possible in future to parse root's arrays? I mean is it bug or feature?

        People

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

          Dates

          • Created:
            Updated:
            Resolved: