It’s not a matter of "difference".
Web services are "API’s" to access data through HTTP protocol. Any form of HTTP communication to transfer data between applications can be called a web service.
There are several ways to structure your "API" using HTTP as a means of transport. The industry has developed and adopted the SOAP, using a huge set of protocols to exchange XML information over HTTP. SOAP gained a very corporate bias and became complex, so some developers adopt XML-RPC, which is more informal.
Initially, XML was used even when the API client was a web application in a browser, but eventually dropped the plug that decoding XML in the browser was too heavy and that it would be simpler to deliver content in JSON, which is nothing more than Javascript’s native data structure.
So JSON is just the data transfer format used by web services. If your web services are consumed by browser applications, it is only natural that you opt for JSON. If they are consumed by other applications, maybe XML makes more sense. Since both are only formats for the same information, development frameworks (Rails, for example) often allow the same web service to return JSON or XML according to the client’s request.