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.
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.
Your best best is to convert it to java objects and then do an update
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It might be a good idea to post an example of something you want to import
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" } } } }}
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.