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

SpinJsonNode#jsonPath behavior is not consistent with other Spin APIs

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Unresolved
    • L3 - Default
    • None
    • None
    • spin
    • None

    Description

      When making a JSON path query and resolving it to a SpinJsonNode (e.g. SpinJsonNode jsonPathNode = spinJsonNode.jsonPath("$[0]").element()), the #element invocation does not return a SpinJsonNode that references the actual JsonNode in the original spinJsonNode variable, but it references a copy of that. In consequence, chaning properties of jsonPathNode is not going to be reflected in spinJsonNode.

      This is not consistent with the other traversal APIs (e.g. SpinJsonNode directAccessNode = spinJsonNode.elements().get(0)) where changes to directAccessNode will be reflected in spinJsonNode. This inconsistency is currently not documented.

      Solution possibilities:

      Forum post: https://forum.camunda.org/t/is-it-possible-to-manipulate-a-json-object-with-the-spin-api/1337

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              Unassigned Unassigned
              thorben.lindhauer Thorben Lindhauer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Salesforce