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.
orazen12Asked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
this will handle reading the json
http://code.google.com/p/google-gson/

you can then use jdbc to update the database
0
 
CEHJCommented:
Your best best is to convert it to java objects and then do an update
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
CEHJCommented:
It might be a good idea to post an example of something you want to import
0
 
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
 
orazen12Author Commented:
Thanks.
0
All Courses

From novice to tech pro — start learning today.