Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: json pretty printing

...

curl -s -H "Accept: application/xml" http://localhost:8080/rest/communities | xmllint --format -

 

Example usage from command line in JSON format with pretty printing:

 

curl -s -H "Accept: application/json" http://localhost:8080/rest/communities | python -m json.tool

For this documentation, we will assume that the URL to the "REST" webapp will be http://localhost:8080/rest/ for production systems, this address will be slightly different, such as: http://demo.dspace.org/rest/. The path to an endpoint, will go after the /rest/, such as /rest/communities, all-together this is: http://localhost:8080/rest/communities

...