I've been looking for the solution to parsing a full 'json' file. I have been looking for the solution but I am beginning to feel like the file is not actually a json file.
My first question would be if it actually is a JSON file and my second would be how I would go about parsing the full file into an array which I can later output.
I have been searching online but every solution I find either doesn't work (to my knowledge) or only includes a simple example with only one set of data that is laid out in a simple way. I am looking to parse a certain json file if it would be possible found at "https://www.accountkiller.com/xml/json/", I am trying to read the json file as a way to learn how to read more advanced file types instead of a basic text document.
I would greatly appreciate the help from anyone who would help me as I don't even have a starting point, thank you for your help in advance.
P.S. I have attempted to attach the json file but all possible formats appear to be blocked.
declan disley wrote:P.S. I have attempted to attach the json file but all possible formats appear to be blocked.
But a JSON file is text, and it's very easy to paste text into your post. So if your mystery file isn't text then it isn't a JSON file. However if it is text and you just don't know whether it's JSON, then go ahead and post it here.
Also reading text is reading text. There's no special way to read any text format. You may (and likely will) have to do something special to parse and interpret that text after you read it, but that's a separate issue.
posted 2 years ago
Sorry, I forgot I could try that,
Anyway I have now attempted to insert the text itself but it contains information which the forum does not allow due to a website which is included in the file. I do not wish to cause alarm and I can assure anyone the website is perfectly legal and safe to use without any hesitation. It is a simple website which allows you to find your accounts on multiple online websites and remove them from one central location. They chose to include a link to a json file incase someone ever did one to create a library in such a fashion.
I am sorry for the inconvenience I may have caused but I simply can't insert the text, instead I have included a snippet from the file which may suffice for getting the general gist of what the file is doing.
Take a look at this thread. The structure of the data is similar to yours. The OP used Gson to deserialize the data into a collection of Java objects - it would probably be a good fit for what you are wanting to do.
Give it a try and post back here if you hit any road blocks along the way.