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

SpinJsonNode#jsonPath behavior is not consistent with other Spin APIs

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Open
    • Priority: L3 - Default
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: spin
    • Labels:
      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: