Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to parse working vscode theme #161

Open
josefgraus opened this issue Apr 19, 2023 · 1 comment
Open

Fails to parse working vscode theme #161

josefgraus opened this issue Apr 19, 2023 · 1 comment

Comments

@josefgraus
Copy link

josefgraus commented Apr 19, 2023

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.

This is definitely a blocker with no immediate workaround for me (I am not the theme writer).

@nickp138
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@josefgraus @nickp138 and others