Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Pesquisar no site de suporte

Evite golpes de suporte. Nunca pedimos que você ligue ou envie uma mensagem de texto para um número de telefone, ou compartilhe informações pessoais. Denuncie atividades suspeitas usando a opção “Denunciar abuso”.

Learn More

How to parse the json format data automatically?

  • 2 respostas
  • 1 tem este problema
  • 4 visualizações
  • Última resposta de 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" ] } ] }

Todas as respostas (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