[Solved] Does Webserver Toolkit work ok with JSON? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Michael Collier · 2013-03-01 02:02 I'm using WST ok with "HTTP" and "TCP" using both "binary:" and "SOAP" but no luck when I switch to "json:". The error I get is: Invalid character at line 1, pos 0: 'N' I'm using the sample calculator project to test this with. I think I have made the correct changes to the server and the client code as follows: Server: 1. I include server_service_json 2. Register the json format Server_service_RegisterJsonFormat(); Client: 1. I include  json_formatter 2. Change the connection info from "SOAP:" to "json:" thus.. Code: [Select]theProxy := wst_CreateInstance_ICalcService('SOAP:','HTTP:', 'http://127.0.0.1:8000/services/ICalcService');becomes..  Code: [Select] theProxy := wst_CreateInstance_ICalcService('json:','HTTP:', 'http://127.0.0.1:8000/services/ICalcService'); Note: This demo has code for handling headers that I have commented out on both the client and server to simplify things and works ok using SOAP so I think the problemm is just the json aspect. ---------------------------------------------------------------------- BigChimp · 2013-03-01 06:04 See first point in my signature. Attaching the sample project would be nice too if possible, so others can check. ---------------------------------------------------------------------- Michael Collier · 2013-03-09 14:39 Solved: WST does work with json but I was missing "/?format=json" from the URL. The WST sample project "user_client_console" used in conjunction with WST sample "http_server" shows all the connection methods supported by WST and got me the solution. ---------------------------------------------------------------------- BigChimp · 2013-03-09 15:33 Thanks for that post & glad it works!