How to know the data is in json format?

1.How or why the data we are getting from the sensor is in json format ?
2.how the user should know the data is in json format?
3.Is this happens with every micro controller or it’s just in bolt hardware ?

JSON is the most widely used data communication formats for sending/receiving data between client and server. So in most cases the data that we receive from a sensor or with API will be in JSON format. You can print the response and see the different classes in the JSON object. For API, you can run the URL in the browser and view the contents of the JSON object.

1 Like

@iamkuldeep52s We know that the response is in JSON since we have programmed the Bolt Cloud to return the sensor data in JSON.

However, this may not be for other sites as they may be using a different format. You will need to view the API documentation for it to know what the response will be like.

1 Like
  1. The data we are receiving from the sensor via the boult cloud is in JSON format because the designers of Bolt have made it so that we receive the data in JSON format.

2)The user can know the data format by going through the required documentation. In this case we know that as they have already told us in the lectures that the data received from the Bolt module is in JSON format. Remember to to use capitals while referring to JSON format since small lettered json means the library in python used to handle files/responses which are in JSON format.

  1. If we need to exchange data between different processes then we could use JSON format to serialize our Python dictionary. The response from other hardware modules need not be in JSON
    format but they must be in any other format similar to JSON which allow data exchange between different networks(eg. server and applications)