Skip to content

Forward slashes escaped in quoted strings #440

@benstahl

Description

@benstahl

When I encode a URL string, SwiftyJSON is escaping all my forward slashes. So this

http://path/to/some/thing.png

becomes this (when viewing the JSON as text, it's fine when unencoded):

http:\/\/path\/to\/some\/thing.png

Which gets quite ugly and unreadable for long URLs. With JSON, it's nice to maintain the "human-readable" part of it, and it's handy to be able to copy-paste URLs from JSON into a browser. Is there any option to NOT escape forward slashes in SwiftyJSON? As I understand it, the JSON spec does not require it, and the whole string will be quoted in the file anyway.

So I guess this is a feature request to add that option, unless I'm missing it somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions