eclipse-wakaama / wakaama

Eclipse Wakaama is a C implementation of the Open Mobile Alliance's LightWeight M2M protocol (LWM2M).
BSD 3-Clause "New" or "Revised" License
503 stars 374 forks source link

JSON and SenML JSON can't omit instance for create #434

Open sbertin-telular opened 5 years ago

sbertin-telular commented 5 years ago

The JSON and SenML JSON formats require the object instance ID for serialization and parsing. This prevent them from being used for a Create without an instance ID. They need to generate and recognize something that looks like "/31024//" to allow Create without an instance ID.

sbertin-telular commented 5 years ago

I just found OpenMobileAlliance/OMA_LwM2M_for_Developers#422 which is related. The work done here should follow from the resolution of that issue.

sbertin-telular commented 5 years ago

Leshan uses -1 for the object instance ID for the JSON format when creating without an instance ID.

sbernard31 commented 4 years ago

Using -1 was a bug and this is now fixed on Leshan. For JSON we just forbid it. For SenML JSON/Cbor we are waiting for OMA answer but my guess this will not be allowed in LWM2M 1.2.