Fix check for the first key in JSON stringify from Dictionary code
This commit is contained in:
parent
cf8e9fd80c
commit
dd116d7998
1 changed files with 4 additions and 1 deletions
|
@ -121,8 +121,11 @@ String JSON::_stringify(const Variant &p_var, const String &p_indent, int p_cur_
|
|||
keys.sort();
|
||||
}
|
||||
|
||||
bool first_key = true;
|
||||
for (Variant &E : keys) {
|
||||
if (E != keys.front()) {
|
||||
if (first_key) {
|
||||
first_key = false;
|
||||
} else {
|
||||
s += ",";
|
||||
s += end_statement;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue