writing the following code will show the bug - the first 3 prints just print the json itself and its attributes. after that, the line "json[emptySubscript] = JSON(7)" should put 7 alone in the json, but when printing the json again it hasn't changed at all.
import SwiftyJSON
var json = JSON(["number": JSON(123),
"code": JSON(456)])
let emptyArray: [String] = []
let emptySubscript = emptyArray.map { $0 as JSONSubscriptType}
print(json.description)
print(json["number"].description)
print(json[emptySubscript].description)
json[emptySubscript] = JSON(7)
print("json after change:\n (json.description)")
writing the following code will show the bug - the first 3 prints just print the json itself and its attributes. after that, the line "json[emptySubscript] = JSON(7)" should put 7 alone in the json, but when printing the json again it hasn't changed at all.
import SwiftyJSON
var json = JSON(["number": JSON(123),
"code": JSON(456)])
let emptyArray: [String] = []
let emptySubscript = emptyArray.map { $0 as JSONSubscriptType}
print(json.description)
print(json["number"].description)
print(json[emptySubscript].description)
json[emptySubscript] = JSON(7)
print("json after change:\n (json.description)")