Link to home
Start Free TrialLog in
Avatar of orazen12
orazen12

asked on

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.
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Your best best is to convert it to java objects and then do an update
SOLUTION
Avatar of a_b
a_b

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It might be a good idea to post an example of something you want to import
Avatar of orazen12
orazen12

ASKER

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"                }            }        }    }}
crate java objects
create java objects
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks.