Sample code for 30+ languages & platforms
Swift

Decode HTML Entity Encoded JSON

See more JSON Examples

Decodes an HTML entity encoded string to JSON.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    var success: Bool = false

    let sb = CkoStringBuilder()!

    success = sb.append(value: "{"xyz": "abc"}")

    sb.entityDecode()

    // This is a test comment;
    print("\(sb.getAsString()!)")

    // Output is:

    // {"xyz": "abc"}

}