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

#include <JsonMapper.h>

Static Public Member Functions

static int mapAttributes (JsonObject jsonObj, ContentInstance *cin, int level=0, bool restCreation=false, bool mapAll=false)
 
static ContentInstanceparseResource (JsonObject o, const String &name, Entity *targetEntity)
 

Detailed Description

Provide specific mapping and parsing methods dedicated to CIN resource

Member Function Documentation

◆ mapAttributes()

int ContentInstanceMapper::mapAttributes ( JsonObject  jsonObj,
ContentInstance cin,
int  level = 0,
bool  restCreation = false,
bool  mapAll = false 
)
static

Map specific attributes of CIN resource

Parameters
jsonObjroot of the json object used to map the resource
cntentity 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()

ContentInstance * ContentInstanceMapper::parseResource ( JsonObject  o,
const String &  name,
Entity targetEntity 
)
static

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

Parameters
jsonObjroot of the json object used to map the resource
nameof the entity (to be handled externaly)
targetEntityparent of the resource to create
Returns
the created entity

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