fn sanitize_value(val: &serde_json::Value) -> serde_json::Value {
    if is_infinity(val) {
        return create_float_max_value();
    }

    if is_negative_infinity(val) {
        return create_float_min_value();
    }

    val.clone()
}
/// Takes what is assumed to be one of either a numerical serde_json value OR
/// a custom JSON encoding representing negative or positive infinty, and converts the
/// infinity values into float minimum or float maximum values, leaving the others
/// the same.
///
/// This is done to simplify the logic for verifying the consistency of numerical types
/// in deserialized objects. We shan't be concerned about the transformation of these
/// inifinite values in histograms since they only exist as overflow and underflow boundaries
/// which don't appear in the deserialized representation.
Takes what is assumed to be one of either a numerical serde_json value OR
a custom JSON encoding representing negative or positive infinty, and converts the
infinity values into float minimum or float maximum values, leaving the others
the same.

This is done to simplify the logic for verifying the consistency of numerical types
in deserialized objects. We shan't be concerned about the transformation of these
inifinite values in histograms since they only exist as overflow and underflow boundaries
which don't appear in the deserialized representation.
Takes what is assumed to be one of either a numerical serde_json value OR a custom JSON encoding representing negative or positive infinty and converts the infinity values into float minimum or float maximum values leaving the others the same . This is done to simplify the logic for verifying the consistency of numerical types in deserialized objects . We shan ' t be concerned about the transformation of these inifinite values in histograms since they only exist as overflow and underflow boundaries which don ' t appear in the deserialized representation .
fn sanitize_value(val: &serde_json::Value) -> serde_json::Value {
    if is_infinity(val) {
        return create_float_max_value();
    }
    if is_negative_infinity(val) {
        return create_float_min_value();
    }
    val.clone()
}
fn sanitize_value ( val : & serde_json :: Value ) -> serde_json :: Value { if is_infinity ( val ) { return create_float_max_value ( ) ; } if is_negative_infinity ( val ) { return create_float_min_value ( ) ; } val . clone ( ) }
Takes what is assumed to be one of either a numerical serde_json value OR
a custom JSON encoding representing negative or positive infinty, and converts the
infinity values into float minimum or float maximum values, leaving the others
the same.
Takes what is assumed to be one of either a numerical serde_json value OR a custom JSON encoding representing negative or positive infinty and converts the infinity values into float minimum or float maximum values leaving the others the same .
val
&serde_json::Value