Function: JSONCallback

CALL:

JSONCallback(event)

DESCRIPTION:

Callback called by modelit.webserver.Server object for generating a JSON response.

INPUT:

event modelit.webserver.HttpExchange
with the request data and methods to generate a response.

OUTPUT:

      No output, a response with a JSON object is return to the client.
 

EXAMPLE:

   server = modelit.web.server.Server('localhost', 8081, @JSONCallback).start() 
 
   % Open a webbrowser and type: http://localhost:8081 in the address bar
   % Now a json message appears in the browser.