Skip to content

Commit

Permalink
Update serialise_value.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nora-Olivia-Ammann committed Nov 15, 2024
1 parent 6bace5f commit 7fd32cb
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,22 @@ def serialise(self) -> dict[str, Any]:
return serialised


class SerialiseList(SerialiseValue):
"""An ListValue to be serialised."""

value: str

def serialise(self) -> dict[str, Any]:
serialised = {
"@type": "knora-api:ListValue",
"knora-api:listValueAsListNode": {
"@id": self.value,
},
}
serialised.update(self._get_optionals())
return serialised


class SerialiseLink(SerialiseValue):
"""A LinkValue to be serialised."""

Expand Down

0 comments on commit 7fd32cb

Please sign in to comment.