【发布时间】:2013-06-06 12:59:29
【问题描述】:
假设我在 HTML 页面中通过 TextArea 输入文本。如何使用 Eclipse 将其转换为 JSON 格式? 我使用 TextArea 输入的字符串示例是
对于 AWSDataTransfer 产品,这是公开定价计划。 关于跨 EC2 AZ 的数据传输: 在所有 AWS 区域,入站费用为 0.01 USD/GB。 在所有 AWS 区域,出站费用为 0.01 美元/GB。
【问题讨论】:
-
您能更详细地描述您的问题吗?您使用的是哪个应用程序服务器/框架?您是否希望它只是一个字符串,例如
{"text": "For the AWS..."}还是基于字符串的子部分结构化? -
你这么说是什么意思:How do Iconvert it into json form using eclipse.??
-
我想把它变成 Map-List-String 的形式。我想编写一个 java 程序,它会打开一个文件,其中包含我通过 HTML 页面中的文本区域提供的信息并将其转换为 JSON 形式。
-
{"myString":"For the AWSDataTransfer product, this is the public pricing plan. Regarding data transfer across EC2 AZs: In all AWS regions, inbound is $0.01/GB. In all AWS regions, outbound is $0.01/GB."}。如果没有更多信息,很难说出您真正在寻找什么。 -
我希望它转换成 JSON 格式,看起来像 "Product" : "AWSDataTransfer", "PlanName" : "public", "EC2Regional" : [ {"region" : "all", “类型”:“输入”,“速率”:“$0.01/GB”},{“区域”:“全部”,“类型”:“输出”,“速率”:“$0.01/GB”}],跨度>