Skip to content

Add JSON minify/compact operation #4

@krisarmstrong

Description

@krisarmstrong

Description

Add ability to minify/compact JSON by removing whitespace.

Tasks

  • Add --minify flag to json_ops.py
  • Ensure no trailing whitespace
  • Add tests
  • Update documentation

Example Usage

json-tools --minify -i formatted.json -o compact.json

Implementation

Use json.dumps(data, separators=(',', ':')) for compact output.

Success Criteria

  • Produces valid, minimal JSON
  • Preserves data integrity
  • Works with large files

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions