NIMSDK-iOS
载入中...
搜索中...
未找到
V2NIMMessageConverter.h
浏览该文件的文档.
1//
2// V2NIMMessageConverter.h
3// NIMLib
4//
5// Created by 崔生余 on 2024/3/20.
6// Copyright © 2024 Netease. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10
11@class V2NIMMessage;
12
13NS_ASSUME_NONNULL_BEGIN
14
15@interface V2NIMMessageConverter : NSObject
16/**
17 * 消息序列化为字符串
18 *
19 * @param message 消息对象
20 * @return 返回字符串或者nil
21 * @discussion 如果传入的对象为空返回字符串为空
22 */
23+ (NSString * _Nullable)messageSerialization:(V2NIMMessage *)message;
24
25/**
26 * 消息字符串转换为消息
27 *
28 * @param msg 消息字符串
29 * @return 消息对象
30 * @discussion 传入空串,或者不符合json格式的字符串,返回结果为nil
31 */
32+ (V2NIMMessage * _Nullable)messageDeserialization:(NSString *)msg;
33
34@end
35
36NS_ASSUME_NONNULL_END
Definition: V2NIMMessageConverter.h:16
消息对象
Definition: V2NIMMessage.h:35