Jose Ramon
Jose Ramon

Reputation: 5386

Write json to text file, jettison

I have created a JSONOBject JSONObject features = new JSONObject(); which I want to store it in a txt file. I am using Jettison LIbrary for handling json files. However I didn't find a way to write json to file. Any idea?

Upvotes: 2

Views: 872

Answers (1)

Abhishek
Abhishek

Reputation: 375

You can use Json Writer to create a text which can be stored in a file. The text generated here abides all of the syntax rules of JSON and allows you to save the JSON object as text file.

Upvotes: 1

Related Questions