net: lwm2m: add JSON formatter for WRITE operations
Update the parsing functions for JSON used by the JSON data formatter and enable it in the LwM2M engine. Signed-off-by: Michael Scott <mike@foundries.io>
This commit is contained in:
parent
26599e30d4
commit
181544beec
3 changed files with 359 additions and 106 deletions
|
@ -1201,6 +1201,13 @@ static int select_reader(struct lwm2m_input_context *in, u16_t format)
|
|||
in->reader = &oma_tlv_reader;
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_LWM2M_RW_JSON_SUPPORT
|
||||
case LWM2M_FORMAT_OMA_JSON:
|
||||
case LWM2M_FORMAT_OMA_OLD_JSON:
|
||||
in->reader = &json_reader;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
LOG_WRN("Unknown content type %u", format);
|
||||
return -ENOMSG;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue