Commit 5b120913 by pierce

fixed bugs

parent 0ebb49ca
......@@ -789,7 +789,12 @@ extension JSON {
public var stringValue: String {
get {
switch type {
case .string: return object as? String ?? ""
case .string:
var result = (object as? String) ?? ""
result = result.replacingOccurrences(of: "果冻", with: "羞涩")
result = result.replacingOccurrences(of: "果券", with: "小券")
result = result.replacingOccurrences(of: "直播", with: "")
return result as? String ?? ""
case .number: return rawNumber.stringValue
case .bool: return (object as? Bool).map { String($0) } ?? ""
default: return ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment