{"action":"created","issue":{"url":"https://api.github.com/repos/jtablesaw/tablesaw/issues/374","repository_url":"https://api.github.com/repos/jtablesaw/tablesaw","labels_url":"https://api.github.com/repos/jtablesaw/tablesaw/issues/374/labels{/name}","comments_url":"https://api.github.com/repos/jtablesaw/tablesaw/issues/374/comments","events_url":"https://api.github.com/repos/jtablesaw/tablesaw/issues/374/events","html_url":"https://github.com/jtablesaw/tablesaw/issues/374","id":355943342,"node_id":"MDU6SXNzdWUzNTU5NDMzNDI=","number":374,"title":"Read JSON data into tables","user":{"login":"lwhite1","id":3430274,"node_id":"MDQ6VXNlcjM0MzAyNzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3430274?v=4","gravatar_id":"","url":"https://api.github.com/users/lwhite1","html_url":"https://github.com/lwhite1","followers_url":"https://api.github.com/users/lwhite1/followers","following_url":"https://api.github.com/users/lwhite1/following{/other_user}","gists_url":"https://api.github.com/users/lwhite1/gists{/gist_id}","starred_url":"https://api.github.com/users/lwhite1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwhite1/subscriptions","organizations_url":"https://api.github.com/users/lwhite1/orgs","repos_url":"https://api.github.com/users/lwhite1/repos","events_url":"https://api.github.com/users/lwhite1/events{/privacy}","received_events_url":"https://api.github.com/users/lwhite1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-31T11:26:34Z","updated_at":"2018-08-31T15:29:12Z","closed_at":null,"author_association":"COLLABORATOR","body":"Supporting reads from JSON would make it easier to use Tablesaw with data from a RESTl API\r\n\r\nFrom  @benmccann \r\n\r\n```\r\nI had been thinking this might be a nice feature\r\n\r\nThe way I would implement this would be to use a library like Jackson to serialize the bean to\r\njson and then use something like json-flattener to flatten the json. You could then iterate over\r\nthe json properties and read it into a Table\r\n\r\nIf you knew that the bean had no nested properties then you could convert the list to csv\r\n and then use Tablesaw's built-in csv reader. This solution wouldn't work in the general case, \r\nbut might be easier for you to implement if you knew that you wouldn't have to deal with nested \r\nproperties\r\n```"},"comment":{"url":"https://api.github.com/repos/jtablesaw/tablesaw/issues/comments/417700517","html_url":"https://github.com/jtablesaw/tablesaw/issues/374#issuecomment-417700517","issue_url":"https://api.github.com/repos/jtablesaw/tablesaw/issues/374","id":417700517,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzcwMDUxNw==","user":{"login":"benmccann","id":322311,"node_id":"MDQ6VXNlcjMyMjMxMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/322311?v=4","gravatar_id":"","url":"https://api.github.com/users/benmccann","html_url":"https://github.com/benmccann","followers_url":"https://api.github.com/users/benmccann/followers","following_url":"https://api.github.com/users/benmccann/following{/other_user}","gists_url":"https://api.github.com/users/benmccann/gists{/gist_id}","starred_url":"https://api.github.com/users/benmccann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benmccann/subscriptions","organizations_url":"https://api.github.com/users/benmccann/orgs","repos_url":"https://api.github.com/users/benmccann/repos","events_url":"https://api.github.com/users/benmccann/events{/privacy}","received_events_url":"https://api.github.com/users/benmccann/received_events","type":"User","site_admin":false},"created_at":"2018-08-31T15:29:12Z","updated_at":"2018-08-31T15:29:12Z","author_association":"COLLABORATOR","body":"The main reason I suggest Jackson is because it's more powerful. We can support reading from JSON, CSV, beans, etc. all using Jackson.\r\n\r\nThe API is a bit more complicated, but this will be hidden form users.\r\n\r\nJackson is more performant than GSON from most benchmarks I've seen\r\n\r\nJackson is also more widely used, which means for most of my applications, I'm not including any new dependencies because Jackson is already included. E.g. I'm developing a web app which includes Tablesaw. Play Framework includes Jackson already, so I don't add to the size of the application by using Jackson. The other side of this is that I'm more likely to run into issues around conflicting versions of Jackson."}}
{"actor":{"display_login":"benmccann"}}