JSON Voorhees
Killer JSON for C++
Loading...
Searching...
No Matches
serialization.hpp File Reference

Conversion between C++ types and JSON values. More...

#include <jsonv/config.hpp>
#include <jsonv/detail/scope_exit.hpp>
#include <jsonv/path.hpp>
#include <jsonv/value.hpp>
#include <jsonv/version.hpp>
#include <exception>
#include <memory>
#include <new>
#include <typeinfo>
#include <typeindex>
#include <type_traits>
#include <utility>
#include <vector>
+ Include dependency graph for serialization.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  jsonv::duplicate_type_error
 Exception thrown if an insertion of an extractor or serializer into a formats is attempted, but there is already an extractor or serializer for that type. More...
 
class  jsonv::extraction_error
 Exception thrown if there is any problem running extract. More...
 
class  jsonv::extraction_error::problem
 Description of a single problem with extraction. More...
 
class  jsonv::no_extractor
 Thrown when formats::extract does not have an extractor for the provided type. More...
 
class  jsonv::no_serializer
 Thrown when formats::to_json does not have a serializer for the provided type. More...
 
class  jsonv::extract_options
 Configuration for various extraction options. This becomes part of the extraction_context. More...
 
class  jsonv::extractor
 An extractor holds the method for converting JSON source into an arbitrary C++ type. More...
 
class  jsonv::serializer
 A serializer holds the method for converting an arbitrary C++ type into a value. More...
 
class  jsonv::adapter
 An adapter is both an extractor and a serializer. More...
 
class  jsonv::formats
 Simply put, this class is a collection of extractor and serializer instances. More...
 
class  jsonv::context_base
 Provides extra information to routines used for extraction. More...
 
class  jsonv::extraction_context
 
class  jsonv::serialization_context
 

Enumerations

enum class  jsonv::duplicate_type_action : unsigned char { duplicate_type_action::ignore , duplicate_type_action::replace , duplicate_type_action::exception }
 The action to take when an insertion of an extractor or serializer into a formats is attempted, but there is alredy an extractor or serializer for that type. More...
 

Functions

template<typename T >
jsonv::extract (const value &from, const formats &fmts)
 Extract a C++ value from from using the provided fmts.
 
template<typename T >
jsonv::extract (const value &from)
 Extract a C++ value from from using jsonv::formats::global().
 
template<typename T >
value jsonv::to_json (const T &from, const formats &fmts)
 Encode a JSON value from from using the provided fmts.
 
template<typename T >
value jsonv::to_json (const T &from)
 Encode a JSON value from from using jsonv::formats::global().
 

Detailed Description

Conversion between C++ types and JSON values.

Copyright (c) 2015-2020 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.hpp.