0
0
IOT Protocolsdevops~10 mins

JSON payload formatting in IOT Protocols - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a JSON payload with a temperature reading.

IOT Protocols
{ "temperature": [1] }
Drag options to blanks, or click blank then click option'
Atemperature
B"22.5"
C'22.5'
D22.5
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the number inside quotes makes it a string, not a number.
Using single quotes is invalid in JSON.
2fill in blank
medium

Complete the code to add a humidity field with value 60 in the JSON payload.

IOT Protocols
{ "humidity": [1] }
Drag options to blanks, or click blank then click option'
A60
B"60"
C'60'
Dhumidity
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around numbers.
Using single quotes instead of double quotes.
3fill in blank
hard

Fix the error in the JSON payload by completing the missing value for the "device" field.

IOT Protocols
{ "device": [1] }
Drag options to blanks, or click blank then click option'
Adevice123
B'device123'
C"device123"
Ddevice
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around string values.
Using single quotes instead of double quotes.
4fill in blank
hard

Fill both blanks to create a JSON payload with a sensor ID and its status.

IOT Protocols
{ "sensor_id": [1], "status": [2] }
Drag options to blanks, or click blank then click option'
A"sensor007"
Btrue
C"active"
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using boolean true/false as strings with quotes.
Not quoting string values.
5fill in blank
hard

Fill all three blanks to create a JSON payload with device name, battery level, and charging status.

IOT Protocols
{ "device_name": [1], "battery": [2], "charging": [3] }
Drag options to blanks, or click blank then click option'
A"sensorX"
B85
Cfalse
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Putting numbers or booleans inside quotes.
Using uppercase True/False instead of lowercase true/false.