示例#1
0
 public static string ToJson(this Message message)
 {
     return(JsonSerializer.Serialize(message, JsonSerializerOptionsFactory.CreateOptions()));
 }
示例#2
0
 public static string ToJson(this IEnumerable <Message> messages)
 {
     return(JsonSerializer.Serialize(messages, JsonSerializerOptionsFactory.CreateOptions()));
 }
示例#3
0
 public static UsageDetails DeserializeUsageDetails(string json)
 {
     return(JsonSerializer.Deserialize <UsageDetails>(json, JsonSerializerOptionsFactory.CreateOptions()));
 }
示例#4
0
 public static Message DeserializeMessage(string json)
 {
     return(JsonSerializer.Deserialize <Message>(json, JsonSerializerOptionsFactory.CreateOptions()));
 }
 public static string ToJson(this UsageDetails usageDetails)
 {
     return(JsonSerializer.Serialize(usageDetails, JsonSerializerOptionsFactory.CreateOptions()));
 }