theme-converter-for-vs
theme-converter-for-vs copied to clipboard
Fails to parse working vscode theme
I attempted to convert Black Ocean theme from vscode following the instructions in the repo. I used "Administrator: Developer Command Prompt for VS 2022" in order to build ThemeConverter. I ran into the following error attempting to use it to convert the theme I'd like to port over to Visual Studio:
ThemeConverter.exe -i "D:\Coding\black-ocean-color-theme.json" -t "C:\Program Files\Microsoft Visual Studio\2022\Community"
Converting D:\Coding\black-ocean-color-theme.json
Newtonsoft.Json.JsonReaderException: Invalid character after parsing property name. Expected ':' but got: ". Path 'colors.foreground', line 1, position 11071.
at Newtonsoft.Json.JsonTextReader.ParseProperty()
at Newtonsoft.Json.JsonTextReader.ParseObject()
at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json)
at ThemeConverter.Converter.ConvertFile(String themeJsonFilePath, String pkgdefOutputPath) in D:\Coding\theme-converter-for-vs\ThemeConverter\ThemeConverter\Converter.cs:line 61
at ThemeConverter.Program.Convert(String sourcePath, String pkgdefOutputPath, String deployInstall) in D:\Coding\theme-converter-for-vs\ThemeConverter\ThemeConverter\Program.cs:line 100
at ThemeConverter.Program.Main(String[] args) in D:\Coding\theme-converter-for-vs\ThemeConverter\ThemeConverter\Program.cs:line 62
Seems to get caught up attempting to parse the json for the theme.
- Converter version: commit a9290b7
- VS version: 17.5.4
- Theme used: Black Ocean
This is definitely a blocker with no immediate workaround for me (I am not the theme writer).
It's due to the comments in the JSON file. If you remove all the comments that start below line #435 then it should work correctly.