Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6106
  • Last Modified:

Can I import JSON file into MySQL?

Hi,
I have a file in the JSON format which I need to import to mysql. Is there a way I can directly import the file to mysql using Java or do I need to convert it to xml first?

Thanks.
0
orazen12
Asked:
orazen12
  • 2
  • 2
  • 2
  • +2
2 Solutions
 
CEHJCommented:
Your best best is to convert it to java objects and then do an update
0
 
CEHJCommented:
It might be a good idea to post an example of something you want to import
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
orazen12Author Commented:
CEHJ,
The data is as below:

{    "glossary": {     "title": "example glossary",            "GlossDiv": {            "title": "S",                  "GlossList": {                "GlossEntry": {                    "ID": "SGML",                              "SortAs": "SGML",                              "GlossTerm": "Standard Generalized Markup Language",                              "Acronym": "SGML",                              "Abbrev": "ISO 8879:1986",                              "GlossDef": {                        "para": "A meta-markup language, used to create markup languages such as DocBook.",                                    "GlossSeeAlso": ["GML", "XML"]                    },                              "GlossSee": "markup"                }            }        }    }}
0
 
ss_pCommented:
crate java objects
0
 
ss_pCommented:
create java objects
0
 
objectsCommented:
this will handle reading the json
http://code.google.com/p/google-gson/

you can then use jdbc to update the database
0
 
orazen12Author Commented:
Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now