JSON Voorhees
Killer JSON for C++
serialization_util.hpp File Reference

Helper types and functions for serialization. More...

#include <jsonv/config.hpp>
#include <jsonv/demangle.hpp>
#include <jsonv/functional.hpp>
#include <jsonv/serialization.hpp>
#include <initializer_list>
#include <functional>
#include <map>
#include <type_traits>

Go to the source code of this file.

Classes

class  jsonv::extractor_construction< T >
 
class  jsonv::extractor_for< T >
 
class  jsonv::function_extractor< T, FExtract >
 
class  jsonv::serializer_for< T >
 
class  jsonv::function_serializer< T, FToJson >
 
class  jsonv::adapter_for< T >
 
class  jsonv::function_adapter< T, FExtract, FToJson >
 
class  jsonv::optional_adapter< TOptional >
 An adapter for optional-like types. More...
 
class  jsonv::container_adapter< TContainer >
 An adapter for container types. More...
 
class  jsonv::wrapper_adapter< TWrapper >
 An adapter for "wrapper" types. More...
 
class  jsonv::enum_adapter< TEnum, FEnumComp, FValueComp >
 An adapter for enumeration types. More...
 
class  jsonv::polymorphic_adapter< TPointer >
 An adapter which can create polymorphic types. More...
 

Typedefs

template<typename TEnum , typename FEnumComp = std::less<TEnum>>
using jsonv::enum_adapter_icase = enum_adapter< TEnum, FEnumComp, value_less_icase >
 An adapter for enumeration types which ignores the case when extracting from JSON. More...
 

Enumerations

enum  jsonv::keyed_subtype_action : unsigned char { jsonv::keyed_subtype_action::none, jsonv::keyed_subtype_action::check, jsonv::keyed_subtype_action::insert }
 What to do when serializing a keyed subtype of a polymorphic_adapter. More...
 

Functions

template<typename FExtract >
auto jsonv::make_extractor (FExtract func) -> function_extractor< decltype(func(std::declval< const extraction_context & >(), std::declval< const value & >())), FExtract >
 
template<typename FExtract , typename = void>
auto jsonv::make_extractor (FExtract func) -> function_extractor< decltype(func(std::declval< const value & >())), FExtract >
 
template<typename T , typename FToJson >
function_serializer< T, FToJson > jsonv::make_serializer (FToJson to_json_)
 
template<typename FExtract , typename FToJson >
auto jsonv::make_adapter (FExtract extract, FToJson to_json_) -> function_adapter< decltype(extract(std::declval< const extraction_context & >(), std::declval< const value & >())), FExtract, FToJson >
 
template<typename FExtract , typename FToJson , typename = void>
auto jsonv::make_adapter (FExtract extract, FToJson to_json_) -> function_adapter< decltype(extract(std::declval< const value & >())), FExtract, FToJson >
 

Detailed Description

Helper types and functions for serialization.

These are usually not needed unless you are writing your own extractor or serializer.

Copyright (c) 2015 by Travis Gockel. All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the Apache License as published by the Apache Software Foundation, either version 2 of the License, or (at your option) any later version.

Author
Travis Gockel (travi.nosp@m.s@go.nosp@m.ckelh.nosp@m.ut.c.nosp@m.om)

Definition in file serialization_util.hpp.