onmyway133 / notes

:notebook_with_decorative_cover: Issues and solutions I found during development, mostly iOS
https://onmyway133.com/
MIT License
63 stars 4 forks source link

Escape string in swift #661

Open onmyway133 opened 10 months ago

onmyway133 commented 10 months ago

If we have a regex inside json string in swift variable, we need multiple escaping

let dict = [
    "name": "{\"key\": \"\\\]\"}"
]