Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-2460

Using Spin I can manipulate a JSON / List object

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2.0, 7.2.0-alpha4
    • Component/s: spin
    • Labels:

      Description

      AT:

      • I can append to the end of a list

      SpinJsonObject o = JSON("

      {\"a\": [ ] }

      ");
      o.prop(a)
      .append("1")
      .append(JSON("

      { ... }

      "))

      =>> { a: [ 1,

      {...}

      ] }

      • I can insert at a specific position:

      SpinJsonObject o = JSON("

      {\"a\": [1, 2 ] }

      ");
      o.prop("a").insertAt(1, "3") =>

      { a: [1,3,2] }

      o.prop("a").insertAt(-1, "3") =>

      { a: [1,2,3] }
      • I can insert after/before a specific value:

      SpinJsonObject o = JSON("

      {\"a\": [1, 2 ] }

      ");
      o.prop("a").insertAfter(1, "3") =>

      { a: [1,3,2] }

      o.prop("a").insertBefore(1, "3") =>

      { a: [3,1,2] }
      • I can use equivalent remove() methods

        Attachments

          Activity

            People

            Assignee:
            matthijs.burke Matthijs Burke
            Reporter:
            meyer Daniel Meyer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: