সহায়তা খুঁজুন

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

আরও জানুন

How to parse the json format data automatically?

  • 2 উত্তরসমূহ
  • 1 এই সমস্যাটি আছে
  • 4 দেখুন
  • শেষ জবাব দ্বারা cor-el

more options

when: http://192.168.16.131:6900/query/v1/mp4/11111111111111111111111100000066.json?bits=5024

response: {"return":"succ","client":{"ip":"192.168.131.30","sp":"0","loc":"0"},"playlist":[{"bits":"4060","tname":"super-dvd","size":"90000500","urls":["http://4.2.3.3:60/play/AB00000000000000000000000000000000000107.mp4","http://4.2.3.2:70/play/AB00000000000000000000000000000000000107.mp4"]}]}


and i want :


{

 return: "succ",
 client: {
   ip: "192.168.131.30",
   sp: "0",
   loc: "0"
 },
 playlist: [
   {
     bits: "4060",
     tname: "super-dvd",
     size: "90000500",
     urls: [
       "http://4.2.3.3:60/play/AB00000000000000000000000000000000000107.mp4",
       "http://4.2.3.2:70/play/AB00000000000000000000000000000000000107.mp4"
     ]
   }
 ]

}

when: http://192.168.16.131:6900/query/v1/mp4/11111111111111111111111100000066.json?bits=5024 response: {"return":"succ","client":{"ip":"192.168.131.30","sp":"0","loc":"0"},"playlist":[{"bits":"4060","tname":"super-dvd","size":"90000500","urls":["http://4.2.3.3:60/play/AB00000000000000000000000000000000000107.mp4","http://4.2.3.2:70/play/AB00000000000000000000000000000000000107.mp4"]}]} and i want : { return: "succ", client: { ip: "192.168.131.30", sp: "0", loc: "0" }, playlist: [ { bits: "4060", tname: "super-dvd", size: "90000500", urls: [ "http://4.2.3.3:60/play/AB00000000000000000000000000000000000107.mp4", "http://4.2.3.2:70/play/AB00000000000000000000000000000000000107.mp4" ] } ] }

All Replies (2)

more options

You're doing this in JavaScript, or just opening it directly in Firefox?

Generally speaking, text files like JSON responses do not have any associated style sheet and Firefox just displays them as received. To pretty it up, you probably need to retrieve it with a script that generates an HTML page from it. Perhaps there is an add-on for that?

more options