-1

When i run curl to get the request , i m getting unreadable format.

[{"id":"e174a8ab-aead-4885-991c-c170ea799d71","securityResourceId":"f0adf525-3491-474f-9f13-9b5f2e2c14c5","name":"BPIM-bpimdmgr-idev4-01","active":true,"licensed":true,"licenseType":"AUTHORIZED","status":"ONLINE","version":"6.1.1.0.608443","workingDirectory":"\/fs\/misc\/bpim-local\/bpimdmgr-idev4-01\/uDeploy\/Agent2\/var\/work\/","impersonationPassword":"****","impersonationForce":false,"tags":[]},{"id":"70b84792-b80c-4728-bae5-08e06bed6c02","securityResourceId":"875bf8b1-4249-4894-9ddd-8deb94a6dae8","name":"CMIX-cmixdmgr-nprd3-01-xxappmgm","active":true,"licensed":true,"licenseType":"AUTHORIZED","status":"ONLINE","version":"6.1.1.0.608443","workingDirectory":"\/apps\/udeploy-agent\/CMIX-cmixdmgr-nprd3-01-xxappmgm\/var\/work\/","impersonationPassword":"****","impersonationForce":false,"tags":[]},{"id":"b6c6f10c-7199-48e8-b3f3-cff87e2ac1ea","securityResourceId":"d5601541-89a8-4cd5-8265-0ffdc81f464f","name":"CMIX-cmixuser-nprd3-01","active":true,"licensed":true,"licenseType":"AUTHORIZED","status":"ONLINE","version":"6.1.1.0.608443","workingDirectory":"\/apps\/udeploy-agent\/CMIX-cmixuser-nprd3-01\/var\/work\/",
.......

Can you please tel me that how i ll get output like row

Thanks Kalai

zmo
  • 24,463
  • 4
  • 54
  • 90
Kalaiyarasan
  • 267
  • 3
  • 6
  • 13

2 Answers2

0

your data is not unreadable, it's data formatted as JSON!

you can view your data nicely using a firefox plugin such as:

or you can use a commandline tool such as:

% curl http://example.org/json_data | python -m json.tool

Zmo..How I convert into html or normal format ?

This is as normal a format as possible! You can get the data in python to use it from any language, for example in python (with :

import requests
data = requests.get('http://example.org/json_data').json()
# use data like a python object
print(data)

Unlike HTML, JSON has been designed for machine-to-machine processing, with no external formatting. It's up to you to write a code that downloads that data and shows it off in a nice way.

zmo
  • 24,463
  • 4
  • 54
  • 90
  • Thank you very much for your replying..I want to know that how to use https (SSL ) in python .. – Kalaiyarasan Mar 08 '15 at 16:19
  • please look at this question: http://stackoverflow.com/a/13514942/1290438 and read the documentation of `requests`: http://docs.python-requests.org/en/latest/user/advanced/#ssl-cert-verification – zmo Mar 08 '15 at 16:28
  • using the same file as you built in the other answer: you can do in python: `requests.get('https://example.com', cert='/wrong_path/server.pem')` – zmo Mar 08 '15 at 16:32
0

This reads like JSON format response data to me.

Andy
  • 157
  • 10