1

How to parsing JSON in java?

{
 "code": 100,
 "message": "SUCCESS",
 "result": {
 "list": [
 {
 "cardNumber": "ALUFZZ5SZ1Q5",
 "expireTime": 1270742400,
 "surplusThreshold": 4,
 "uid": 771292,
 "useTime": 1270214375,
 "wareId": 1145
 },
 {
 "cardNumber": "ALUFZZ5SZ1QD",
 "expireTime": 1270828800,
 "surplusThreshold": 7,
 "uid": 784289,
 "useTime": 1270302200,
 "wareId": 1145
 },
 {
 "cardNumber": "ALUFZZ5SZ1RC",
 "expireTime": 1270828800,
 "surplusThreshold": 10,
 "uid": 773664,
 "useTime": 1270300871,
 "wareId": 1145
 },
 {
 "cardNumber": "ALUFZZ5SZ1UM",
 "expireTime": 1270828800,
 "surplusThreshold": 10,
 "uid": 779560,
 "useTime": 1270282841,
 "wareId": 1145
 },
 {
 "cardNumber": "ALUFZZ5SZ1VT",
 "expireTime": 1270656000,
 "surplusThreshold": 2,
 "uid": 754099,
 "useTime": 1270106775,
 "wareId": 1145
 }
 ],
 "pageCount": 61,
 "pageIndex": 2,
 "pageSize": 5,
 "recordCount": 308
 }
}
Josh Lee
179k39 gold badges279 silver badges282 bronze badges
asked Apr 14, 2010 at 8:43
2
  • 3
    Search on the forum before asking. Exact duplicate?stackoverflow.com/questions/338586/a-better-java-json-library/… Commented Apr 14, 2010 at 8:46
  • The first step would be searching StackOverflow, or simply clicking one of the many related question listed while posting the question. Then, if that does not help, post your question with a lot more detail or the problem you are trying to solve. "How to parse JSON" is quite vague! You will need to tell os what you want it parsed into. Commented Apr 14, 2010 at 8:53

2 Answers 2

2

Follow the examples in gson-user-guide

Download Site

More json libraries are listet at json.org

answered Apr 14, 2010 at 8:46
Sign up to request clarification or add additional context in comments.

Comments

1

I have had good results with the StringTree JSON library.

answered Jun 1, 2010 at 15:02

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.