When I use the UIDescription editor, the uidesc is not saved as XML like it used to be

How can I change it back to XML?
{
“vstgui-ui-description”: {
“version”: “1”,
“bitmaps”: {},
“fonts”: {},
“colors”: {},
“custom”: {
“FocusDrawing”: {},
“VST3Editor”: {
“Path”: “/Users/marclingk/Documents/VST_SDK/vst3sdk/public.sdk/buildMarc/testuidesc/resource/editor.uidesc”
},
“UIGridController”: {
“Grids”: “1x 1,5x 5,10x 10,12x 12,15x 15”
},
“UITemplateController”: {
“SelectedTemplate”: “view”
},
“UIEditController”: {
“EditViewScale”: “1”,
“EditorSize”: “0, 0, 500, 545”,
“SplitViewSize_0_0”: “0.7495183044315992804129678006574977189302”,
“SplitViewSize_0_1”: “0.2119460500963391003104163701209472492337”,
“SplitViewSize_1_0”: “0.4797687861271676124097496085596503689885”,
“SplitViewSize_1_1”: “0.5105973025048169411377330106915906071663”,
“SplitViewSize_2_0”: “0.6400000000000000133226762955018784850836”,
“SplitViewSize_2_1”: “0.3499999999999999777955395074968691915274”,
“TabSwitchValue”: “0”,
“Version”: “1”
},
“UIAttributesController”: {},
“UIViewCreatorDataSource”: {
“SelectedRow”: “8”
}
},
“templates”: {
“view”: {
“attributes”: {
“background-color”: “~ MagentaCColor”,
“background-color-draw-style”: “filled and stroked”,
“class”: “CViewContainer”,
“mouse-enabled”: “true”,
“opacity”: “1”,
“origin”: “0, 0”,
“size”: “300, 300”,
“transparent”: “false”,
“wants-focus”: “false”
},
“children”: {
“CKnob”: {
“attributes”: {
“angle-range”: “270”,
“angle-start”: “135”,
“circle-drawing”: “false”,
“class”: “CKnob”,
“corona-color”: “~ CyanCColor”,
“corona-dash-dot”: “true”,
“corona-dash-dot-lengths”: “1.26,0.1”,
“corona-drawing”: “true”,
“corona-from-center”: “false”,
“corona-inset”: “12”,
“corona-inverted”: “false”,
“corona-line-cap-butt”: “true”,
“corona-outline”: “true”,
“corona-outline-width-add”: “2”,
“default-value”: “0.5”,
“handle-color”: “~ WhiteCColor”,
“handle-line-width”: “8”,
“handle-shadow-color”: “~ BlackCColor”,
“max-value”: “1”,
“min-value”: “0”,
“mouse-enabled”: “true”,
“opacity”: “1”,
“origin”: “80, 90”,
“size”: “70, 70”,
“skip-handle-drawing”: “true”,
“transparent”: “false”,
“value-inset”: “3”,
“wants-focus”: “true”,
“wheel-inc-value”: “0.1”,
“zoom-factor”: “1.5”
}
},
“CKnob”: {
“attributes”: {
“angle-range”: “270”,
“angle-start”: “135”,
“circle-drawing”: “false”,
“class”: “CKnob”,
“corona-color”: “~ GreenCColor”,
“corona-dash-dot”: “true”,
“corona-dash-dot-lengths”: “1.26,0.1”,
“corona-drawing”: “true”,
“corona-from-center”: “false”,
“corona-inset”: “12”,
“corona-inverted”: “false”,
“corona-line-cap-butt”: “true”,
“corona-outline”: “true”,
“corona-outline-width-add”: “2”,
“default-value”: “0.5”,
“handle-color”: “~ WhiteCColor”,
“handle-line-width”: “8”,
“handle-shadow-color”: “~ BlackCColor”,
“max-value”: “1”,
“min-value”: “0”,
“mouse-enabled”: “true”,
“opacity”: “1”,
“origin”: “180, 160”,
“size”: “70, 70”,
“skip-handle-drawing”: “true”,
“transparent”: “false”,
“value-inset”: “3”,
“wants-focus”: “true”,
“wheel-inc-value”: “0.1”,
“zoom-factor”: “1.5”
}
}
}
}
}
}
}

Why is the format now changed from XML to JSON?
XML was fine for me.

It’ not funny to place 200+ controllers by hand.

You should not edit the uidesc file by hand if you are using the VST3Editor class. If you use the UIDescription class otherwise you can use SaveFlags::kWriteAsXML to write the uidesc file as xml.

Thank you Arne, I will try this.

@Arne_Scheffler is XML format deprecated or are you planning to support it as well? I was under the impression that it was deprecated… Please confirm. Thanks

Currently is not deprecated.

@Arne_Scheffler back in 3.7.2 (2+ years ago): Version 3.7.2 (2021/03/30) - VST 3 Developer Portal

UIDescription files are now written in JSON format and the old XML format is deprecated

I don’t like the json format which is extremely verbose but because of this statement in the release notes I have updated my plugins/framework to use it.

And today you are saying it is not deprecated. Can you please clarify which statement is the final word?

There won’t be any changes regarding the xml support. Currently it is still compiled in per default, but can be turned off via cmake. And because of all the security issues in expat my advise is to not use it anymore.
JSON is much faster and if you work with git or svn or any other SCM you can track your changes much better with it as with the XML output of uidescription.

Thank you for the clarification.

Actually the behaviour is like this:
I import the perfect edited XML-file with all controllers etc.
The plug opens with only a black square.
When I open th UIDescription Editor, it shows all my GUI like it should be
When saving, it saves only an empty file. no gain for next time.

Do I have to modify something here?:
(in uidescription.h)

public :

UIDescription (const CResourceDescription& uidescFile, IViewFactory* viewFactory = nullptr);

UIDescription (IContentProvider* contentProvider, IViewFactory* viewFactory = nullptr);

~UIDescription () noexcept override ;

virtual bool parse ();

using AttributeSaveFilterFunc = bool () (CView view, const std::string& name);

enum SaveFlags {

kWriteWindowsResourceFile = 1 << WriteWindowsResourceFileBit,

kWriteImagesIntoUIDescFile = 1 << WriteImagesIntoUIDescFileBit,

kDoNotVerifyImageData = 1 << DoNotVerifyImageDataBit,

kWriteAsXML = 1 << WriteAsXmlBit,

kWriteImagesIntoXMLFile [[deprecated(“use kWriteImagesIntoUIDescFile”)]] = kWriteImagesIntoUIDescFile,

kDoNotVerifyImageXMLData [[deprecated(“use kDoNotVerifyImageData”)]] = kDoNotVerifyImageData,

Show me your code that does this.

Normally the transition from XML to JSON should be without custom interaction, just load it and if you save it, it will be saved as JSON.

Here is my XML, it has 315 lines:
editor.uidesc

And the code where you load it?

Hi Arne, Thank you for the help! here is the code ( no operation, only GUI)
neuesInst.zip

@marclingk if you are on Windows and using the DLL format, you might be running into an issue I reported in the past but as of today has not been fixed

But that’s not the problem here.
The problem is that in the source code @marclingk wrote:
auto* view = new VSTGUI::VST3Editor (this, "view", "editor.uidesc");
So you want to open the view called view from the editor.uidesc file.
In the editor.uidesc file, the only view available is a view called Editor. So if you make both names equal it should work. Either change the line in the source code to:
auto* view = new VSTGUI::VST3Editor (this, "Editor", "editor.uidesc");
or the name of the view in the editor.uidesc file:
<template background-color="TF_Grey" background-color-draw-style="filled and stroked" class="CViewContainer" maxSize="450, 300" minSize="450, 300" mouse-enabled="true" name="view" opacity="1" origin="0, 0" size="900, 660" transparent="false" wants-focus="false">