//
//  NSJSONSerialization+GM.swift
//  Gengmei
//
//  Created by licong on 16/8/25.
//  Copyright © 2016年 更美互动信息科技有限公司. All rights reserved.
//

import Foundation

@objc public extension JSONSerialization {
    class func JSONString(_ object: AnyObject) -> String? {
        guard let data = try? JSONSerialization.data(withJSONObject: object, options: .prettyPrinted),
        let string = String(data: data, encoding: String.Encoding.utf8) else { return nil }
        return string
    }
}
