|
LOM2M
0.8.0
|
#include <JsonMapper.h>
Static Public Member Functions | |
| static int | mapResourceAttributes (JsonObject jsonObj, Entity *e, int level=0, bool restCreation=false, bool mapAll=false) |
| static int | mapGenericAttributes (JsonObject jsonObj, Entity *e, int level=0, bool restCreation=false, bool mapAll=false) |
| static int | mapGenericModifiedAttributes (JsonObject jsonObj, Entity *e) |
| static int | mapChildResourcesRef (JsonObject jsonObj, Entity *e, int level=0, bool restCreation=false, bool mapAll=false) |
| static int | mapChildResources (JsonObject jsonObj, Entity *e, int level=0, bool restCreation=false, bool mapAll=false) |
| static int | parseGenericAttributes (JsonObject jsonObj, Entity *e) |
Provide generic mappers to map attributes from resources in memory (entity) Works on provided json Objects
|
static |
Map child resources (will map attributes of child resources of target entity) Will go recursively if level is > 1
| jsonObj | root of the json object used to map the resource |
| e | entity to map to a json object |
| level | level of depth of mapping (in case of mapping with children resources) |
| restCreation | boolean used to avoid serializing non permitted attributes (useful for REST creation of resource) |
| mapAll | internal parameter used for full serialization of all entities |
|
static |
Map child resources references (name, type, uri)
| jsonObj | root of the json object used to map the resource |
| e | entity to map to a json object |
| level | level of depth of mapping (in case of mapping with children resources) |
| restCreation | boolean used to avoid serializing non permitted attributes (useful for REST creation of resource) |
| mapAll | internal parameter used for full serialization of all entities |
|
static |
Map generic atributes of resources (such as creation time, labels, etc.)
| jsonObj | root of the json object used to map the resource |
| e | entity to map to a json object |
| level | level of depth of mapping (in case of mapping with children resources) |
| restCreation | boolean used to avoid serializing non permitted attributes (useful for REST creation of resource) |
| mapAll | internal parameter used for full serialization of all entities |
|
static |
Map only modified attributes based on global list MODIFIEDATTRIBUTES
| jsonObject | root of the json object used to map the resource |
| e | the entity to be mapped |
| level | level of depth of the mapping |
|
static |
Map all atributes of any resource (will use specific mappers to do so)
| jsonObj | root of the json object used to map the resource |
| e | entity to map to a json object |
| level | level of depth of mapping (in case of mapping with children resources) |
| restCreation | boolean used to avoid serializing non permitted attributes (useful for REST creation of resource) |
| mapAll | internal parameter used for full serialization of all entities |
|
static |
Parse generic attributes of entity Used to load attributes (for persistence only) The loaded attributes are mostly NP attributes at creation and / or update
| jsonObj | root of the json object to load in memory |
| entity | the entity with parameter to be loaded |