Pivot
  1. Pivot
  2. PIVOT-764

BeanAdapter should support Map objects

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.1
    • Component/s: core-beans
    • Labels:
      None

      Description

      BeanAdapter currently does not support the ability to wrap Maps, because it will fail to retrieve the correct getterMethod and setterMethod. My current usecase is that I have a TableView with tableData that consists of objects with path "value-of-type-map.subvalue". The following code should return John Doe in my opinion:

      HashMap root = new HashMap();
      HashMap child = new HashMap();
      child.put("name", "John Doe");
      root.put("child", child);
      System.out.println(JSON.get(root, "child.name"));

      I will provide a patch.

        Activity

        Edvin Syse created issue -
        Edvin Syse made changes -
        Field Original Value New Value
        Attachment BeanAdapter-Map-Support.patch [ 12483509 ]
        Greg Brown made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Greg Brown made changes -
        Affects Version/s 2.0 [ 12313780 ]
        Edvin Syse made changes -
        Attachment BeanAdapter-Map-Support.patch [ 12483509 ]
        Edvin Syse made changes -
        Attachment JSON-java_util_Map-support.patch [ 12483556 ]
        Edvin Syse made changes -
        Resolution Won't Fix [ 2 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Edvin Syse made changes -
        Attachment JSON-java_util_Map-support.patch [ 12483556 ]
        Edvin Syse made changes -
        Attachment BeanAdapter-Map-support.patch [ 12483602 ]
        Edvin Syse made changes -
        Attachment BeanAdapter-Map-support.patch [ 12483602 ]
        Edvin Syse made changes -
        Attachment JSON-java_util_Map-support.patch [ 12483678 ]
        Sandro Martini made changes -
        Assignee Sandro Martini [ smartini ]
        Sandro Martini made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Sandro Martini
            Reporter:
            Edvin Syse
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development