Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

stringify json swift

do {
        let arrJson = try JSONSerialization.data(withJSONObject: dataAddress, options: JSONSerialization.WritingOptions.prettyPrinted)
        let string = String(data: arrJson, encoding: String.Encoding(rawValue: String.Encoding.utf8.rawValue))
        let tempJson = string! as String
        print("%%%%%%",tempJson)
    }catch let error as NSError{
        print(error.description)
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #stringify #json #swift
ADD COMMENT
Topic
Name
7+7 =