• Hi Guest!

    We are extremely excited to announce the release of our first Beta for VaM2, the next generation of Virt-A-Mate which is currently in development.
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.

Question Too many closing brackets

HaiiiHarrr

Member
Joined
Dec 6, 2023
Messages
30
Reactions
6
!> Exception during process of meta.json from package S95.JennaFuta.2: System.Exception: JSON Parse: Too many closing brackets
at SimpleJSON.JSONNode.Parse (System.String aJSON) [0x00000] in <filename unknown>:0
at SimpleJSON.JSON.Parse (System.String aJSON) [0x00000] in <filename unknown>:0
at MVR.FileManagement.VarPackage.LoadMetaData () [0x00000] in <filename unknown>:0


Can I fix this by opening the .var, go to the meta json and try and "count" the brackets and remove the ones that seem excessive?

Or can e.g. notepad ++ help me to identify the bad brackets?


Edit: has 21 "{" and 23 "}", now let's find the ones not matching up...
 
Last edited:
Should be fixable IF only the brackets are messed up and nothing important was deleted.
A text editor that can highlight matching bracket pairs helps. Visual Studio does this or Sublime.
Have not used Notepad++ a long time. So my info may be outdated ...
If I remember correct it did required some sort of extension/plugin to highlight the syntax or various formats (json?) or code languages.

Or you repack the content with the VaM package builder to get a clean meta.json.
 
Upvote 0
Ah, I guess I'll try the package builder first before I keep tinkering around.

While trying to fix the original file might have done something to it, it seems like the order I wanted to connect them is wrong and now I get a new set of error messages.
 
Upvote 0
well, I think I found a much easier solution: Deleting this .var as well as the one .var file that was using it seemed to have fixed the error reports.
 
Upvote 0
!> Exception during process of meta.json from package S95.JennaFuta.2: System.Exception: JSON Parse: Too many closing brackets
at SimpleJSON.JSONNode.Parse (System.String aJSON) [0x00000] in <filename unknown>:0
at SimpleJSON.JSON.Parse (System.String aJSON) [0x00000] in <filename unknown>:0
at MVR.FileManagement.VarPackage.LoadMetaData () [0x00000] in <filename unknown>:0


Can I fix this by opening the .var, go to the meta json and try and "count" the brackets and remove the ones that seem excessive?

Or can e.g. notepad ++ help me to identify the bad brackets?


Edit: has 21 "{" and 23 "}", now let's find the ones not matching up...

"Can you fix this manually?"

Yes ... little (!!!) bit fiddly, though.

What you want to do is:

1) Get a good editor with suitable (for JSON) plugins.
- For smaller fiddly-stuff like this, Notpad++ suffices. I recommend the "Brackets" plugin (just search the available plugins list for "brackets" or smth)
- For more extensive work with json files, I can recommend the VScode editor (personally, I just installed every json-related plugin ;))

Note: The most frequent json-related errors are:
* Mismatched brackets
* Missing End-of-line commas - most likely in the "Contents" field. Every line EXCEPT FOR THE LAST LINE has to end with a comma. The last line MUST NOT end with a comma.

Frequently, those are the result of copy-paste mistakes during manual edits. There are also online json-parsers that can be helpful figuring out what mistake exactly is giving VaM hickups.

2) Re-zipping the .var

Personally, I use 7-zip, so the following is for 7-zip:
* Select the respective files & folders (Saves, Custom and meta.json).
* Right-click > "7-Zip" > "Add to archive"
* In the dialog that pops up, you see a line with the archive-name, bring that into VaM-compatible form (creatorname.packagename.versionnumber.var), By default, the ending is probably ".zip" -> replace that with ".var"
* Below that line with the archivename, you see "Archive Format" - has to be "Zip"
* Below that, there's "Compression Level" - has to be "Fastest"

All the other options, you leave at default.


Hope that helps!

P.S.: If you have more questions, feel free to ask, also via PM!
 
Upvote 0
well, I think I found a much easier solution: Deleting this .var as well as the one .var file that was using it seemed to have fixed the error reports.

Yeah, that's actually the best option in 99% of cases. :cool:
 
Upvote 0
Back
Top Bottom