SpinJsonNode#jsonPath behavior is not consistent with other Spin APIs

XMLWordPrintable

    • Type: Bug Report
    • Resolution: Unresolved
    • Priority: L3 - Default
    • None
    • Affects Version/s: None
    • Component/s: spin
    • None

      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

        This is the controller panel for Smart Panels app

              Assignee:
              Unassigned
              Reporter:
              Thorben Lindhauer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: