Metadata-Version: 2.4
Name: json-profiler
Version: 0.1.0
Summary: A tool for exploring and analyzing JSON structure with aggregated statistics
Home-page: https://github.com/yourusername/json-explorer
Author: Edwin Zhang
Author-email: Edwin Zhang <edwin.zhang@slopeful.com>
License: MIT
Project-URL: Homepage, https://github.com/yourusername/json-explorer
Project-URL: Bug Tracker, https://github.com/yourusername/json-explorer/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# JSON Profiler

A Python tool for exploring and analyzing JSON structure with aggregated statistics. This package helps you understand the structure of complex JSON data by providing detailed insights into field types, presence percentages, and nested structures.

## Installation

```bash
pip install json-profiler
```

## Usage

```python
from json_profiler import explore_json_aggregated
import json

# Example JSON data
data = {
    "users": [
        {"id": 1, "name": "Alice", "email": "alice@example.com", "tags": ["admin", "user"]},
        {"id": 2, "name": "Bob", "email": "bob@example.com", "tags": []},
        {"id": 3, "name": "Charlie", "tags": ["user"]}
    ],
    "metadata": {
        "total": 3,
        "active": True
    }
}

# Analyze the JSON structure
result = explore_json_aggregated(data)
```

This will output:
```
=== AGGREGATED STRUCTURE ===
users[] (total items: 3 across 1 list instances):
  email: str (66.7% present)
  id: int (100.0% present)  
  name: str (100.0% present)
  tags: list (100.0% present) [WARNING: 1/3 lists empty (33.3%)]

ROOT[] (total items: 1 across 1 list instances):
  active: bool (100.0% present)
  total: int (100.0% present)
```

## Features

- **Field Analysis**: Shows data types and presence percentages for each field
- **Nested Structure Support**: Handles deeply nested JSON objects and arrays
- **Empty List Detection**: Warns about empty lists in your data
- **Aggregated Statistics**: Provides comprehensive statistics across all instances
- **Type Information**: Shows all data types encountered for each field

## Return Value

The function returns a dictionary containing all unique values found for each field across the entire JSON structure.

## License

MIT License
