ObjectMapper.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/parser/json/mapping/ObjectMapper.hpp"

ObjectMapper

Json ObjectMapper. Serialized/Deserializes oatpp DTO objects to/from JSON. See Data Transfer Object(DTO) component.
Extends oatpp::base::Countable, oatpp::data::mapping::ObjectMapper.

namespace oatpp { namespace parser { namespace json { namespace mapping { 
  class ObjectMapper : public oatpp::base::Countable, public oatpp::data::mapping::ObjectMapper {}
}}}}

Fields

Type Name Summary
std::shared_ptr<Serializer::Config> serializerConfig Serializer config.
std::shared_ptr<Deserializer::Config> deserializerConfig Deserializer config.

Methods

Return Type Name Summary
[none] ObjectMapper Constructor.
std::shared_ptr<ObjectMapper> createShared Create shared ObjectMapper.
void write Implementation of oatpp::data::mapping::ObjectMapper::write().
oatpp::data::mapping::type::AbstractObjectWrapper read Implementation of oatpp::data::mapping::ObjectMapper::read().

ObjectMapper::serializerConfig

Serializer config.

std::shared_ptr<Serializer::Config> serializerConfig

ObjectMapper::deserializerConfig

Deserializer config.

std::shared_ptr<Deserializer::Config> deserializerConfig

ObjectMapper::ObjectMapper

Constructor.

ObjectMapper(const std::shared_ptr<Serializer::Config>& pSerializerConfig = Serializer::Config::createShared(),
             const std::shared_ptr<Deserializer::Config>& pDeserializerConfig = Deserializer::Config::createShared())

ObjectMapper::createShared

Create shared ObjectMapper.

static std::shared_ptr<ObjectMapper>
createShared(const std::shared_ptr<Serializer::Config>& serializerConfig = Serializer::Config::createShared(),
             const std::shared_ptr<Deserializer::Config>& deserializerConfig = Deserializer::Config::createShared())

ObjectMapper::write

Implementation of oatpp::data::mapping::ObjectMapper::write().

void write(const std::shared_ptr<oatpp::data::stream::OutputStream>& stream,
           const oatpp::data::mapping::type::AbstractObjectWrapper& variant) const override

ObjectMapper::read

Implementation of oatpp::data::mapping::ObjectMapper::read().

oatpp::data::mapping::type::AbstractObjectWrapper read(oatpp::parser::Caret& caret,
                                                       const oatpp::data::mapping::type::Type* const type) const override