The Pseudo-Storyline Structure

As you can see, the JSON data supplied by the Content Store (see The Storyline JSON Structure) has a flatter structure than the XML document needed for export to CUE Print (see The Target CUE Print Structure). The bolded word in the first paragraph is not nested inside the paragraph, and list items are not nested inside lists. In this JSON structure, formatting and other kinds of annotations are defined by specifying the character ranges to which they apply, and nested elements are unpacked and referenced indirectly. In line 8, for example, the storyline's top-level elements are referenced as follows:

    "elements": ["/storyElements/1","/storyElements/2","/storyElements/3","/storyElements/4","/storyElements/5"]

Further down the file, element 8 (the outer bulleted list) contains a similar entry referencing its contents:

      "elements": ["/storyElements/10","/storyElements/11","/storyElements/12","/storyElements/13"]

So in order to simplify the conversion task, CUE Zipline automatically generates the following pseudo-storyline, a restructured version of the JSON data that more closely resembles the required XML target structure:

{
  "storyline_id": "5b3251f0-33ba-11eb-b23d-5b6ae38640b0",
  "type": "print",
  "elements": [
    {
      "type": "print_head",
      "fields": {},
      "elements": [
        {
          "type": "headline",
          "fields": {
            "headline": {
              "value": "My Bullet Test",
              "ops": [
                {
                  "index": 0,
                  "length": 14,
                  "name": "",
                  "value": true,
                  "text": "My Bullet Test"
                }
              ]
            }
          },
          "elements": [],
          "is_empty": false
        }
      ],
      "is_empty": false
    },
    {
      "type": "print_head_deck",
      "fields": {},
      "elements": [],
      "is_empty": true
    },
    {
      "type": "print_body",
      "fields": {},
      "elements": [
        {
          "type": "paragraph",
          "fields": {
            "paragraph": {
              "value": "Here is an introductory paragraph, followed by a list:",
              "ops": [
                {
                  "index": 0,
                  "length": 24,
                  "name": "",
                  "value": true,
                  "text": "Here is an introductory "
                },
                {
                  "index": 24,
                  "length": 9,
                  "name": "bold",
                  "value": true,
                  "sub": [
                    {
                      "index": 0,
                      "length": 9,
                      "name": "",
                      "value": true,
                      "text": "paragraph"
                    }
                  ]
                },
                {
                  "index": 33,
                  "length": 21,
                  "name": "",
                  "value": true,
                  "text": ", followed by a list:"
                }
              ]
            }
          },
          "elements": [],
          "is_empty": false
        },
        {
          "type": "list_bulleted",
          "fields": {},
          "elements": [
            {
              "type": "paragraph",
              "fields": {
                "paragraph": {
                  "value": "Item one",
                  "ops": [
                    {
                      "index": 0,
                      "length": 8,
                      "name": "",
                      "value": true,
                      "text": "Item one"
                    }
                  ]
                }
              },
              "elements": [],
              "is_empty": false
            },
            {
              "type": "paragraph",
              "fields": {
                "paragraph": {
                  "value": "Item two",
                  "ops": [
                    {
                      "index": 0,
                      "length": 8,
                      "name": "",
                      "value": true,
                      "text": "Item two"
                    }
                  ]
                }
              },
              "elements": [],
              "is_empty": false
            },
            {
              "type": "list_bulleted",
              "fields": {},
              "elements": [
                {
                  "type": "paragraph",
                  "fields": {
                    "paragraph": {
                      "value": "Nested one",
                      "ops": [
                        {
                          "index": 0,
                          "length": 10,
                          "name": "",
                          "value": true,
                          "text": "Nested one"
                        }
                      ]
                    }
                  },
                  "elements": [],
                  "is_empty": false
                },
                {
                  "type": "paragraph",
                  "fields": {
                    "paragraph": {
                      "value": "Nested two",
                      "ops": [
                        {
                          "index": 0,
                          "length": 10,
                          "name": "",
                          "value": true,
                          "text": "Nested two"
                        }
                      ]
                    }
                  },
                  "elements": [],
                  "is_empty": false
                }
              ],
              "is_empty": false
            },
            {
              "type": "paragraph",
              "fields": {
                "paragraph": {
                  "value": "Item three",
                  "ops": [
                    {
                      "index": 0,
                      "length": 10,
                      "name": "",
                      "value": true,
                      "text": "Item three"
                    }
                  ]
                }
              },
              "elements": [],
              "is_empty": false
            }
          ],
          "is_empty": false
        },
        {
          "type": "paragraph",
          "fields": {
            "paragraph": {
              "value": "Concluding paragraph.",
              "ops": [
                {
                  "index": 0,
                  "length": 21,
                  "name": "",
                  "value": true,
                  "text": "Concluding paragraph."
                }
              ]
            }
          },
          "elements": [],
          "is_empty": false
        }
      ],
      "is_empty": false
    },
    {
      "type": "print_assets",
      "fields": {},
      "elements": [],
      "is_empty": true
    },
    {
      "type": "print_quote",
      "fields": {},
      "elements": [],
      "is_empty": true
    }
  ],
  "inherited_from": "http://my-content-store:8080/webservice/escenic/storyline/ad9c82a8-3314-11eb-b23d-5b6ae38640b0"
}