Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71482

Dumping lists is not supported

XMLWordPrintable

      I want to dump to YAML a data structure that is a list of maps, but I only get:

      data parameter has invalid content (no-basic classes)

      That doesn't make sense to me, since SnakeYAML can do this just fine. Please remove this restriction. Sample code:

      def data = [
        [
          key_1: "value1",
          key_2: [
            "item_1",
            "item_2",
          ],
        ],
        [
          key_1: "value2",
          key_2: [
            "item_3",
            "item_4",
          ],
        ],
      ]
      def yaml = writeYaml(charset: 'UTF-8', data: data, returnText: true)

            rsandell rsandell
            dhs Dirk Heinrichs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: