Client side calcuration

The format of the communication between a client and a server is changed to JSON, and a client parse it with a JSON object.