Function is_empty_json

Source
pub fn is_empty_json(value: &Value) -> bool
Expand description

Check if a JSON value is empty

This function checks if a JSON value is considered empty based on its type:

  • Null: Always empty
  • Boolean: Never empty
  • Number: Never empty
  • String: Empty if string length is 0
  • Array: Empty if array length is 0
  • Object: Empty if object has no keys

§Arguments

  • value - The JSON value to check

§Returns

  • bool - True if the value is considered empty, false otherwise