0
0
IOT Protocolsdevops~10 mins

JSON for human-readable data 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 object with a device name.

IOT Protocols
{
  "device": "[1]"
}
Drag options to blanks, or click blank then click option'
Astatus
Bdevice_name
Csensor_01
Dtemperature
Attempts:
3 left
💡 Hint
Common Mistakes
Using a key name instead of a value.
Choosing a value that is not a device name.
2fill in blank
medium

Complete the JSON to include the temperature reading as a number.

IOT Protocols
{
  "temperature": [1]
}
Drag options to blanks, or click blank then click option'
A"25C"
B"twenty five"
Ctemperature
D25
Attempts:
3 left
💡 Hint
Common Mistakes
Putting numbers inside quotes, making them strings.
Using words instead of numbers.
3fill in blank
hard

Fix the error in this JSON snippet by completing the missing value for the status key.

IOT Protocols
{
  "status": [1]
}
Drag options to blanks, or click blank then click option'
Atrue
B"true"
CTrue
Dyes
Attempts:
3 left
💡 Hint
Common Mistakes
Using capitalized True which is Python style, not JSON.
Putting boolean values inside quotes.
4fill in blank
hard

Fill both blanks to create a JSON object with sensor ID and its reading.

IOT Protocols
{
  "sensor_id": "[1]",
  "reading": [2]
}
Drag options to blanks, or click blank then click option'
Asensor_123
B45.6
C"45.6"
Dsensor
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the reading value inside quotes.
Not quoting the sensor ID string.
5fill in blank
hard

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

IOT Protocols
{
  "device": "[1]",
  "active": [2],
  "battery": [3]
}
Drag options to blanks, or click blank then click option'
AsensorX
Btrue
C87
D"true"
Attempts:
3 left
💡 Hint
Common Mistakes
Using "true" as a string instead of boolean true.
Not quoting the device name string.