fix(NightJson): correctly save empty maps
This commit is contained in:
@@ -90,7 +90,7 @@ public class NightJson {
|
|||||||
StringBuilder mapPairs = new StringBuilder();
|
StringBuilder mapPairs = new StringBuilder();
|
||||||
Map<?, ?> map = (Map<?, ?>) value;
|
Map<?, ?> map = (Map<?, ?>) value;
|
||||||
Iterator<?> it = map.keySet().iterator();
|
Iterator<?> it = map.keySet().iterator();
|
||||||
if (it.hasNext()) mapPairs.append("{");
|
mapPairs.append(it.hasNext() ? "{" : "{}");
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
Object key = it.next();
|
Object key = it.next();
|
||||||
Object val = map.get(key);
|
Object val = map.get(key);
|
||||||
|
|||||||
Reference in New Issue
Block a user