|
JSON Voorhees
Killer JSON for C++
|
This class is used in merge_explicit for defining what the function should do in the cases of conflicts.
More...
#include <jsonv/algorithm.hpp>
Inheritance diagram for jsonv::merge_rules:Public Member Functions | |
| virtual value | resolve_same_key (path &¤t_path, value &&a, value &&b) const =0 |
Called when merging a kind::object and the two objects share a key. More... | |
| virtual value | resolve_type_conflict (path &¤t_path, value &&a, value &&b) const =0 |
Called when a and b have kind values which are incompatible for merging. More... | |
This class is used in merge_explicit for defining what the function should do in the cases of conflicts.
Definition at line 277 of file algorithm.hpp.
|
pure virtual |
Called when merging a kind::object and the two objects share a key.
The implementation can either throw or merge the keys.
| current_path | is the merge path with the key that conflicted appended. |
| a | is the left-hand value to merge. |
| b | is the right-hand value to merge. |
Implemented in jsonv::recursive_merge_rules, jsonv::throwing_merge_rules, and jsonv::dynamic_merge_rules.
|
pure virtual |
Called when a and b have kind values which are incompatible for merging.
The implementation can either throw or coerce a merge.
| current_path | path with the conflicting kind values. |
| a | is the left-hand value to merge. |
| b | is the right-hand value to merge. |
Implemented in jsonv::recursive_merge_rules, jsonv::throwing_merge_rules, and jsonv::dynamic_merge_rules.