Solved

Can I import JSON file into MySQL?

Posted on 2011-03-08
8
4,247 Views
Last Modified: 2012-05-11
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
Comment
Question by:orazen12
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 35068436
Your best best is to convert it to java objects and then do an update
0
 
LVL 20

Assisted Solution

by:a_b
a_b earned 150 total points
ID: 35068441
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35068526
It might be a good idea to post an example of something you want to import
0
 

Author Comment

by:orazen12
ID: 35068717
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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 3

Expert Comment

by:ss_p
ID: 35069710
crate java objects
0
 
LVL 3

Expert Comment

by:ss_p
ID: 35069714
create java objects
0
 
LVL 92

Accepted Solution

by:
objects earned 350 total points
ID: 35074556
this will handle reading the json
http://code.google.com/p/google-gson/

you can then use jdbc to update the database
0
 

Author Closing Comment

by:orazen12
ID: 35128580
Thanks.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now