2
I need to file a case file *.JSON
. I understand that there is a library for this in case I use the json-simple-1.1.1
. How it is necessary to read the file first and then work with it.
My question is this::
I keep the file file.json
within a package com.app.json
and I need to access this file.
What would be the most efficient method to access this file within the package?
Observing:
That should be good for files .json
, .txt
, .xml
and others.
Thank you. Why are you using "Object o = Jsonvalue.parse(in);" as an example? I am using the following line: Jsonobject jsonObjeto = (Jsonobject) parser.parse(in);
– noNihongo
Exactly Eduardo, it’s just an example. You can use
JSONObject
if you prefer. Note also that it is not mandatory to use the classJSONValue
, you can useJSONParser
also.– Miguel Cartagena