Skip to content
Commit e3100c6f authored by Seppo Takalo's avatar Seppo Takalo Committed by Carles Cufí
Browse files

net: lwm2m: Allow SenML-CBOR floats decoded as int



SenML is technically a JSON based format which can
be encoded as a CBOR. SenML-CBOR specification in
RFC 8428 section 6 states that numbers can be decoded
as an integer.

Also RFC 7049 section 4.2 states that JSON numbers
without fractional part can be decoded as an integer.

I have seen with one commercial LwM2M platform that
the decoder  they use, sends floating point values as
integers, if there is no fractional part.

So LwM2M engine cannot assume from the path that
the incomming number is either float or int. Accept both.

Signed-off-by: default avatarSeppo Takalo <seppo.takalo@nordicsemi.no>
parent 2249b87b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment