0

I am trying to read a file containing data in the form of JSON objects and want to display them in a javafx TableView.

FYI The data present in the file is in the following form.

{"fileName":"compiler.xml","fileSize":"0.716796875  kb","destination":"Dev/SyncUtility/.idea/","userName":"itl@itl.com","uploadTime":"Jun 27,2018 15:59","fileType":"xml","status":"uploaded"}

Image shows the javafx tableview where I want to display the data

This is the javafx tableview where i want to display the data

As the table displays recent files I want to retrieve the data in reverse order and show them in the table.

Kindly suggest me how can I get this.

fabian
  • 80,457
  • 12
  • 86
  • 114
Ahamed
  • 29
  • 2
  • 1
    I suggest you get familiar with GSON or a similar library... – fabian Jun 27 '18 at 11:53
  • My advice is to search for JSON sort by value/key – Talgat Jun 27 '18 at 11:54
  • Actually i am able to retrieve the data but unable to to know how to set values into table cells. – Ahamed Jun 27 '18 at 11:56
  • I assumed reversing the list, setting up the `TableView` and reversing the list once it's read is not a real issue. For the former another duplicate link could be added for the latter probably a tutorial would be better (Alternatively if you've created a suitable class for parsing teh JSON, and don't know how to set up the `TableColumn`s, the question would be narrow enough to be answerable here...). – fabian Jun 27 '18 at 12:02

0 Answers0