JSON Voorhees
Killer JSON for C++
jsonv::dynamic_merge_rules Class Reference

An implementation of merge_rules that allows you to bind whatever functions you want to resolve conflicts. More...

#include <jsonv/algorithm.hpp>

+ Inheritance diagram for jsonv::dynamic_merge_rules:

Public Types

using same_key_function = std::function< value(path &&, value &&, value &&)>
 
using type_conflict_function = std::function< value(path &&, value &&, value &&)>
 

Public Member Functions

 dynamic_merge_rules (same_key_function same_key, type_conflict_function type_conflict)
 
virtual value resolve_same_key (path &&current_path, value &&a, value &&b) const override
 
virtual value resolve_type_conflict (path &&current_path, value &&a, value &&b) const override
 

Public Attributes

same_key_function same_key
 
type_conflict_function type_conflict
 

Detailed Description

An implementation of merge_rules that allows you to bind whatever functions you want to resolve conflicts.

Definition at line 302 of file algorithm.hpp.

Member Function Documentation

virtual value jsonv::dynamic_merge_rules::resolve_same_key ( path &&  current_path,
value &&  a,
value &&  b 
) const
overridevirtual
virtual value jsonv::dynamic_merge_rules::resolve_type_conflict ( path &&  current_path,
value &&  a,
value &&  b 
) const
overridevirtual

The documentation for this class was generated from the following file: