LOM2M  0.8.0
Static Public Member Functions | List of all members
RemoteCseMapper Class Reference

#include <JsonMapper.h>

Static Public Member Functions

static int mapAttributes (JsonObject jsonObj, RemoteCse *csr, int level=0, bool restCreation=false, bool mapAll=false)
 
static RemoteCseparseResource (JsonObject o, const String &name, Entity *targetEntity, Entity *toUpdate=nullptr)
 

Detailed Description

Provide specific mapping and parsing methods dedicated to CSR resource

Member Function Documentation

◆ mapAttributes()

int RemoteCseMapper::mapAttributes ( JsonObject  jsonObj,
RemoteCse csr,
int  level = 0,
bool  restCreation = false,
bool  mapAll = false 
)
static

Map specific attributes of CSR resource

Parameters
jsonObjroot of the json object used to map the resource
csrentity to map to a json object
levelof depth of mapping (in case of mapping with children resources)
restCreationboolean used to avoid serializing non permitted attributes (useful for REST creation of resource)
mapAllinternal parameter used for full serialization of all entities
Returns
int different from 0 if an error occurs

◆ parseResource()

RemoteCse * RemoteCseMapper::parseResource ( JsonObject  o,
const String &  name,
Entity targetEntity,
Entity toUpdate = nullptr 
)
static

Parse CSR resource (will map json object to a CSR entity)

Parameters
jsonObjroot of the json object used to map the resource
nameof the entity (to be handled externaly)
respresponse primitive used to return response status code
targetEntityparent of the resource to create
Returns
the created entity

The documentation for this class was generated from the following files: