- A sample JSON file, saved as a
.jsonfile, will look as follows:
- A client can send a person’s details to a server in the preceding JSON format, which the server can parse and create an instance of the
Personobject for use in its execution.
- Later, the response can be sent back by the server to the client in the JSON format, the data of which the client can use to create an object of a class.
- This process of converting an object’s data to the JSON format and JSON-formatted data to an object is named serialization and de-serialization, respectively, which is quite common in REST web services these days.
- Our WebDriver uses the same approach to communicate between client libraries (language bindings) and drivers, such as Firefox Driver, IE Driver, Chrome Driver, and so on. Similarly, the
RemoteWebDriverclient and the
RemoteWebDriverserver use the JSON wire protocol to communicate among themselves