Warning: session_start(): open(/var/lib/php/sessions/sess_58dn4accgm95cjgj0ph5u9kqad, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
sS nicelyFormatJsonDiff(O diff) {
new StringBuilderWithIndent buf;
nicelyFormatJsonDiff(diff, buf);
ret str(buf);
}
svoid nicelyFormatJsonDiff(O diff, StringBuilderWithIndent buf) {
if (diff == null) ret with buf.println("No differences");
if (diff cast JsonDiff.Removed)
ret with buf.println("DELETE " + diff.a);
if (diff cast JsonDiff.Added)
ret with buf.println("ADD " + diff.b);
if (diff cast JsonDiff.Different) // also covers DifferentType
ret with buf.println(diff.a + " -> " + diff.b);
if (diff cast Map) {
for (O key, O value : diff) {
if (!value instanceof JsonDiff.Different
|| !key instanceof JsonDiff.GatheredKey)
if (key cast JsonDiff.GatheredKey) {
buf.println(key.key + "=" + key.value);
} else
buf.println(key);
temp buf.indent();
nicelyFormatJsonDiff(value, buf);
}
ret;
}
buf.println(sfu(diff)); // something unknown
}