See https://meta.wikimedia.org/w/index.php?title=Schema:Sandbox&oldid=4856746
JSONlint.com doesn't think escaping a forward slash with backslash is required.
Version: unspecified
Severity: enhancement
See https://meta.wikimedia.org/w/index.php?title=Schema:Sandbox&oldid=4856746
JSONlint.com doesn't think escaping a forward slash with backslash is required.
Version: unspecified
Severity: enhancement
It's not required, but it's also not wrong. You can enter a single slash in the edit screen, but I don't think we should worry about this canonicalization.
It looks like the real problem was the FormatJson::encode call in objectRow. That's why it looked like that in the pretty HTML version.
It turns out this is useful for other types. Otherwise, true becomes 1. However, it reencodes strings, which we don't want.
Hence, https://gerrit.wikimedia.org/r/39175
This also means instead of (type) ("number") it will be (type) (number). I think that's a feature, since this is an HTML structural view.
It's not wrong, but it's an unintended side-effect of pre-save beautification. The resultant JSON is logically equivalent, however. When we migrate to PHP 5.4 we'll be able to use the JSON_UNESCAPED_SLASHES bit when invoking json_encode().
(In reply to comment #5)
Ori: See Gerrit change #50140.
Oh, wonderful. Thank you very much.