AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.4k stars 276 forks source link

Allow writing out the json header/body (children)/footer separately. #1706

Closed ggarra13 closed 4 months ago

ggarra13 commented 4 months ago

Required:


[x ] I believe this isn't a duplicate topic
[ x] This report is not related to an adapter

Select One:

[ ] Build problem
[ ] Incorrect Functionality or bug
[x] New feature or functionality

Description

Currently, the function to_json_string() in the classes spits out the whole json for a single element. For example, if called from a Track, it will write out the Clips, Transitions, etc.

I would like to be able to spit out the header/body(children)/footer of the json schema individually, so that the json text can be constructed. I am trying to write out a converter between two .otio proprietary formats (not an adapter) and I need this functionality.

Optional


Environment

Operating System:
Python version if appropriate:

Reproduction Steps

Log output if appropriate

Sample data and other attachements