Author Topic: API: json, xml, csv - which one and why?  (Read 2741 times)

brother7

  • Full Member
  • ***
  • Posts: 130
  • Aloha!
    • View Profile
    • Email
API: json, xml, csv - which one and why?
« on: July 30, 2014, 08:49:03 AM »
A question for developers using the Prosper API.

According to the Prosper API documentation:
Quote
The Prosper API uses content negotiation to return result sets in json, xml or csv format by setting the Accept header in your request to “application/json”, “text/xml” or “text/csv”

What are the arguments for/against each format? What format is used by the major developers like P2P-Picks, NSR and LendingRobot?

Fred

  • Hero Member
  • *****
  • Posts: 1421
    • View Profile
Re: API: json, xml, csv - which one and why?
« Reply #1 on: July 30, 2014, 04:26:08 PM »
For tabular data, I like CSV best because it is the least verbose -- field names are specified only once, rather than on every record.

However, CSV does not really support structured data (records containing other records).  For this, I prefer json to xml.