Skip to content

JSONObject::quote(). Why special case for "</" but not "/" #26

Description

@budric

Hi,
I'm having trouble understanding this code:
case '/':
if (b == '<') {
sb.append('');
}
sb.append(c);
break;

Why is escape character '' only appended when the previous character is <. Looking at JSON control characters, the '/' is always a control character and should be prefixed with . Yet the code doesn't do that.

Thanks,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions