M-Davies / M-Davies/arma-api

SQF Script always appends a , to the end of the JSON array output

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
The SQF to JSON extraction script always appends a comma (,) to the end of the array, making the array invalid and requiring manual intervention.

**Expected behavior**
There is no comma on the last element of the JSON array

**Additional context**
This is the line that formats the joined classes string into a string representation of an array. Perhaps it could be removed here?
```sqf
_JSON = "[" + endl + " " + _joinedClasses + endl + "]" + endl;
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the SQF extraction script and the formatting line that builds _JSON from _joinedClasses. Run the extraction with data that produces multiple array elements, then verify that the generated JSON is valid and has no comma after the final element.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.