Coder Social home page Coder Social logo

basemax / minifyjsonc Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 30 KB

A simple C program to minify JSON files by removing whitespace and comments.

License: GNU General Public License v3.0

C 94.70% Makefile 5.30%
c c-json json json-c json-minifier json-minify minify-json

minifyjsonc's Introduction

JSON Minification Tool

A simple C program to minify JSON files by removing whitespace and comments.

Introduction

JSON Minification Tool is a command-line utility that takes a JSON file as input, removes unnecessary whitespace and comments, and outputs a minified JSON file. Minified JSON is useful for reducing file size and improving performance when transmitting JSON data over the internet.

Features

  • Minify JSON by removing:
    • Whitespace characters (spaces, tabs, newlines, and carriage returns).
    • Single-line (//) and multiline (/* ... */) comments.
  • Easy-to-use command-line interface.
  • Supports both single-line and multiline comments within JSON data.

Getting Started

Prerequisites

  • C compiler (e.g., GCC)
  • Make (optional, for building)
  • Git (optional, for cloning the repository)

Installation

  1. Clone the repository:

    git clone https://github.com/BaseMax/MinifyJSONC

    Or download the ZIP file and extract it.

  2. Build the JSON minification tool (optional):

    make

    This step is optional, as you can also compile the C code using your preferred C compiler.

Usage

To minify a JSON file, use the following command:

./minify_json input.json output.json
  • Replace input.json with the path to your input JSON file.
  • Replace output.json with the desired name for the minified output JSON file.

Copyright 2023, Max Base

minifyjsonc's People

Contributors

maxianedison avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.