Code Sample of a JSON and XML API