Json error in Labels when creating new slice in SliceMachine repo

We recently upgraded our prismic repo to the Slice Machine repo. We are still using the Prismic UI to add new slices and make updates. I edit and add labels directly in the JSON editor.
Ex:
image

After I try to add a new slice, I get JSON errors related to labels. It somehow is parsing the “labels” incorrectly when previously it was just an array.
Ex:

Can we continue to use the Prismic UI to make updates and add slices rather than the Slice Machine CLI? Is this error relating to using the Prismic UI?

Hello @joyce, sorry for the delay. Could you please give me more details about your case?

You’re missing the name of the slice, as well as the display option. If this “labels” key is in the correct place (that would be under body.config of your custom type) then adding those missing elements should work.

Take a look at the Full JSON Example in this article:

Hi @paulina.gavilan, the slice name is ‘Content’ and the display option is ‘list’. The “labels” is specified under the config of the slice.

This is a rich text field and I’m adding labels per this page:

Can you paste here the JSON of the Custom type? it'll be easier to debug that way. There must be a problem with the syntax.

    "content" : {
        "type" : "Slice",
        "fieldset" : "Content",
        "description" : "The rich-text workhouse used in article bodies.",
        "icon" : "text_fields",
        "display" : "list",
        "non-repeat" : {
          "content" : {
            "type" : "StructuredText",
            "config" : {
              "multi" : "paragraph, preformatted, heading1, heading2, heading3, heading4, heading5, heading6, strong, em, hyperlink, image, embed, list-item, o-list-item, o-list-item",
              "allowTargetBlank" : true,
              "label" : "content",
              "labels" : [ "caption" ]
            }
          }
        },
        "repeat" : { }
      }

This above is the JSON for the slice (before any errors that come from clicking “Add a slice”. Only after I click “Add a slice” does the below JSON automatically appear.

      "content": {
        "type": "Slice",
        "fieldset": "Content",
        "description": "The rich-text workhouse used in article bodies.",
        "icon": "text_fields",
        "display": "list",
        "non-repeat": {
          "content": {
            "type": "StructuredText",
            "config": {
              "multi": "paragraph, preformatted, heading1, heading2, heading3, heading4, heading5, heading6, strong, em, hyperlink, image, embed, list-item, o-list-item, o-list-item",
              "allowTargetBlank": true,
              "label": "content",
              "labels": {
                "": [
                  {
                    "name": "caption"
                  }
                ]
              }
            }
          }
        },
        "repeat": {}
      }

Do you see how it updates the labels? Is this error related to the move to the slice machine repo and utilizing the prismic UI instead of the slice machine CLI?