Ledger three level nested JSON

Hello,
I'm trying to crate a cloud-to-device ledger, containing some configuration data.
The JSON consists of three levels of data just as shown below:

{
    "telemetry_frequency": {
        "sensing_interval": 5,
        "transmission_interval": 30
    },
    "calibration_data": {
        "linear_threshold": 1.1,
        "size": 0.5,
        "linear_coefficients": {
            "m": .1,
            "b": -0.01
        },
        "nonlinear_coefficients": {
            "w": .01,
            "x": .02,
            "y": .03,
            "z": .04
        }
    }
}

When writing this JSON structure, the set instance button appears greyed out. Is there a way to set this JSON correctly?

Thanks!

@GerardoO the sturcture is correct but you likely need zeroes on the left of the decimals:

{
    "telemetry_frequency": {
        "sensing_interval": 5,
        "transmission_interval": 30
    },
    "calibration_data": {
        "linear_threshold": 1.1,
        "size": 0.5,
        "linear_coefficients": {
            "m": 0.1,
            "b": -0.01
        },
        "nonlinear_coefficients": {
            "w": 0.01,
            "x": 0.02,
            "y": 0.03,
            "z": 0.04
        }
    }
}

Thanks! That was it
Kudos

I faced the same issue - worth knowing to use a site like jsonchecker.com as it can be frustrating sometimes finding the cause.

2 Likes