Uploaded image for project: 'Tamaya'
  1. Tamaya
  2. TAMAYA-355

Revise mapping of xml, json and yaml configurations to honor lists

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 0.3-incubating
    • 0.4-incubating
    • Core, Extensions
    • None

    Description

      Given the following config:

      <config>
        <a>
          <b>23</b>
        </a>
        <a>
          <b>15</b>
        </a>
      </config>

      The current mapping (in core, and the format related modules) results in a.b=15, which is invalid, because it actually looses information.
      This is basically similar for other formats. This change defines that list entries are mapped to arrays as follows:

      a[0].b=23
      a[1].b=15

      This syntax does not loose information and is simple enough to reestablish access logic such as 

      List<Map<String,String>> as = configuration.query(ListQuery.of("a"));

       

      Attachments

        Activity

          People

            anatole Anatole Tresch
            anatole Anatole Tresch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: