1. Set the response type to JSON on WEBGet method of your data service as shown below.
[WebGet(ResponseFormat = WebMessageFormat.Json)]
public IQueryable<Test> GetTests()
var tests = BuildTests();
2. On the client side while requesting a data service set the HTTP header "Accept" with a value "application/json"
Your data service will now returns JSON as a response to the request.