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

#include <JsonMapper.h>

Static Public Member Functions

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

Detailed Description

Provide specific mapping and parsing methods dedicated to SUB resource

Member Function Documentation

◆ mapAttributes()

int SubscriptionMapper::mapAttributes ( JsonObject  jsonObj,
Subscription sub,
int  level = 0,
bool  restCreation = false,
bool  mapAll = false 
)
static

Map specific attributes of SUB resource

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

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

Parse SUB resource (will map json object to a SUB 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: