minifyNS<K> function
A null-safety version of minify.
Implementation
Map<K, dynamic> minifyNS<K>(Map<K, dynamic> json) {
if (json.isEmpty) return json;
final result = <K, dynamic>{};
//Note: we have to preserve the order since it might be important
//to the user
for (final name in json.keys) {
final value = json[name];
if (value != null)
result[name] = value is Map<K, dynamic> ? minifyNS(value): value;
}
return result;
}