/** * @file JsonDiff.h * @brief Differs JSON objects * @date Jul 22, 2015 * @author R.W.A. van der Heijden * @copyright 2015 Dual Inventive Technology Centre B.V. * * Compares two JSON objects or arrays with each other. */ #ifndef INCLUDE_DI_JSONDIFF_H_ #define INCLUDE_DI_JSONDIFF_H_ #include #include namespace Di { class Json; /** * @class JsonDiff * * JSON difference checker */ class JsonDiff { public: void setEpsilon(double epsilon); bool diff(std::shared_ptr from, std::shared_ptr to); JsonDiff() : _epsilon(0.001) { } protected: bool _iseq(double a, double b); bool _diffObject(std::shared_ptr from, std::shared_ptr to); bool _diffArray(std::shared_ptr from, std::shared_ptr to); double _epsilon; }; } // namespace Di #endif // INCLUDE_DI_JSONDIFF_H_