Skip to content

Draft: Add setMetadataJSON() and getMetadataJSON() methods#81

Open
jminor wants to merge 1 commit intoOpenTimelineIO:mainfrom
jminor:metadata
Open

Draft: Add setMetadataJSON() and getMetadataJSON() methods#81
jminor wants to merge 1 commit intoOpenTimelineIO:mainfrom
jminor:metadata

Conversation

@jminor
Copy link
Member

@jminor jminor commented Mar 10, 2026

Sometimes it is a huge pain to get Swift to serialize and deserialize JSON with the right type checking. For example, when you have a list with a mix of strings and integers, that isn't allowed in Swift, but is in JSON. To make this easier to work with, this PR adds two methods on SerializableObjectWithMetadata:

  • setMetadataJSON(jsonString, key)
  • getMetadataJSON(key) -> String

These functions work with raw JSON strings instead of Swift native datatypes. This allows the caller to deal with those strings in any manner they wish.

Signed-off-by: Joshua Minor <joshm@pixar.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant