Deep equality comparison. This will compare all the way down an object or array, and is potentially expensive.

Synopsis

Declared in <folly/json/dynamic.h>

bool
operator==(
    dynamic const& a,
    dynamic const& b);
Note

This function is a hidden friend of dynamic, declared only inside that class: it can be found only through argument-dependent lookup.

Description

NOTE: Implicit conversion will be done between ints and doubles, so numeric equality will apply between those cases. Other dynamic value comparisons of different types will always return false.

Return Value

True if the two dynamics are deeply equal.

Parameters

Name

Description

a

The left‐hand dynamic.

b

The right‐hand dynamic.

Created with MrDocs