我使用c#
从数据库获取数据subscriptionDetailInfo.SubscriptionDescription = item.SubscriptionDescription
输出将是json,如下所示
"SubscriptionDescription":"Before you can. begin to determine what. the composition of. a particular",
现在我需要更换"。"到新线。
我所需的输出将是这样的
"SubscriptionDescription":"Before you can
begin to determine what
the composition of
a particular",
我尝试使用以下方法但不能正常工作
subscriptionDetailInfo.SubscriptionDescription = item.SubscriptionDescription.Replace(".", "/\n / g").Replace("/\n / g", "\\n")
结果输出如下
"SubscriptionDescription":"Before you can\\n begin to determine what\\n the composition of\\n a particular",