I downloaded the personality insights java code from github and I made some changes to the code on hub.jazz. My question is how do I get the results from the personality insights saved into either a database or locally?
Asked
Active
Viewed 92 times
0
-
Have you tried anything and got stuck? A small tutorial on File IO would show you. – 4castle Jan 27 '17 at 19:54
-
1Welcome to stack overflow! Showing your research, including what you have tried and what is not working, puts the question into a scope appropriate for SO. Currently your question is lacking these things and may get down voted. – J E Carter II Jan 27 '17 at 19:54
-
@4castle I haven't actually looked at a File IO. I'll do that and if I get stuck I'll post the code I used and the help I need. Thanks for the recommendation. – Kabi Jan 30 '17 at 08:34
-
@JECarterII thank you for you advice. I shall do that as soon as I've tried the File IO option. – Kabi Jan 30 '17 at 08:36
-
@4castle I've done some research on the File IO. From what I'm seeing the app has to be running locally. What happens if its a web app? I've pushed the app up to Bluemix and would like to store the results every time a user analyzes their personality. – Kabi Jan 31 '17 at 16:57
1 Answers
0
The results from the Personality Insights service are returned in JSON which you can just serialize to a file (or less common, you can return the result as CSV which is even easier - just use a FileWriter to save). Specific code will depend on the JSON library you are using. I'd suggest to just "google" saving a json file in Java and you'll have a bunch of examples and videos.

Neil Boyette
- 171
- 2