简体   繁体   English

将json写入文本文件,抛弃

[英]Write json to text file, jettison

I have created a JSONOBject JSONObject features = new JSONObject(); 我创建了一个JSONOBject JSONObject features = new JSONObject(); which I want to store it in a txt file. 我想将其存储在txt文件中。 I am using Jettison LIbrary for handling json files. 我正在使用Jettison LIbrary处理json文件。 However I didn't find a way to write json to file. 但是我没有找到一种将json写入文件的方法。 Any idea? 任何想法?

You can use Json Writer to create a text which can be stored in a file. 您可以使用Json Writer创建可以存储在文件中的文本。 The text generated here abides all of the syntax rules of JSON and allows you to save the JSON object as text file. 此处生成的文本遵守JSON的所有语法规则,并允许您将JSON对象保存为文本文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM