public static string ToJson(this Message message) { return(JsonSerializer.Serialize(message, JsonSerializerOptionsFactory.CreateOptions())); }
public static string ToJson(this IEnumerable <Message> messages) { return(JsonSerializer.Serialize(messages, JsonSerializerOptionsFactory.CreateOptions())); }
public static UsageDetails DeserializeUsageDetails(string json) { return(JsonSerializer.Deserialize <UsageDetails>(json, JsonSerializerOptionsFactory.CreateOptions())); }
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())); }