24 lines
421 B
Swift
24 lines
421 B
Swift
//
|
|
// Dictionary+NRAdd.swift
|
|
// ReaderHive
|
|
//
|
|
// Created by 澜声世纪 on 2025/12/10.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
extension Dictionary {
|
|
|
|
func toJsonString() -> String? {
|
|
do {
|
|
let data = try JSONSerialization.data(withJSONObject: self)
|
|
let jsonStr = String(data: data, encoding: .utf8)
|
|
return jsonStr
|
|
} catch {
|
|
|
|
}
|
|
return nil
|
|
}
|
|
|
|
}
|