{"id":25300109,"url":"https://github.com/deftio/jsonvice","last_synced_at":"2026-03-05T02:03:31.989Z","repository":{"id":44859239,"uuid":"450227603","full_name":"deftio/jsonvice","owner":"deftio","description":"json minifier with ability to truncate precision of floating point numbers","archived":false,"fork":false,"pushed_at":"2024-09-11T03:18:16.000Z","size":86,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T06:32:43.349Z","etag":null,"topics":["command-line","json","minification","minifiers","python","quantization","quantizer","truncation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deftio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-20T19:16:54.000Z","updated_at":"2025-07-14T19:26:57.000Z","dependencies_parsed_at":"2025-10-28T06:31:04.632Z","dependency_job_id":"234a3257-e07d-4d81-af5d-a3f84fc2a567","html_url":"https://github.com/deftio/jsonvice","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/deftio/jsonvice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deftio%2Fjsonvice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deftio%2Fjsonvice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deftio%2Fjsonvice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deftio%2Fjsonvice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deftio","download_url":"https://codeload.github.com/deftio/jsonvice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deftio%2Fjsonvice/sbom","scorecard":{"id":332548,"data":{"date":"2025-08-11","repo":{"name":"github.com/deftio/jsonvice","commit":"b6fe4774cf9ab7679ee7af697ca4a1b0941f425d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-package.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/deftio/jsonvice/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/deftio/jsonvice/python-package.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:31","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-48p4-8xcf-vxj5","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T03:56:51.985Z","repository_id":44859239,"created_at":"2025-08-18T03:56:51.985Z","updated_at":"2025-08-18T03:56:51.985Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30106158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T01:39:18.192Z","status":"online","status_checked_at":"2026-03-05T02:00:06.710Z","response_time":93,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","json","minification","minifiers","python","quantization","quantizer","truncation"],"created_at":"2025-02-13T05:38:23.583Z","updated_at":"2026-03-05T02:03:31.965Z","avatar_url":"https://github.com/deftio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/jsonvice.svg)](https://badge.fury.io/py/jsonvice)\n[![Build Status](https://api.travis-ci.com/deftio/jsonvice.svg?branch=master)](https://app.travis-ci.com/deftio/jsonvice)\n[![License](https://img.shields.io/badge/License-BSD%202--Clause-blue.svg)](https://opensource.org/licenses/BSD-2-Clause)\n\n# About jsonvice  \n\njsonvice is command line tool for minifying JSON with optimal precision truncation/rounding.  In many applications floating point values in JSON can be very long (15 digits or more) but this level of accuracy isn't needed and takes up much space.\n\njsonvice allows the truncation of all the embedded floating point numbers (wherever they appear) to a specified number of digits. \n\nIt also removes unnecessary white space to minify JSON files.\n\nsample_input.json\n\n```json\n{\n    \"x\" :   12.32,\n    \"y\": 0.23482498323433,\n    \"z\": \"simple test\",\n    \"a\" : [ 1, 2, 3.23423434343 ]\n}\n```\n\nnow run jsonvice\n\n```sh\njsonvice -i input.json -o output.json -p 4\n```\n\nouput.json\n\n```json\n{\"x\":12.32,\"y\":0.2348,\"z\":\"simple test\",\"a\":[1,2,3.2342]}\n```\n\n\n# More Examples\n\ncompactify json and reduce floating point precision to max of 5 digits by rounding\nsh\n\n```shell\njsonvice -i sample_input.json -o output.json -p 5\n```\n\ncompactify json and reduce floating point precision to max of 5 digits by rounding down\n\n```sh\njsonvice -i myfile.json -o output.json -p 5 -q floor\n```\n\njsonvice also allows stdin / stdout pipes to be used\n\n```sh\ncat simple_test.json | python3 path/to/jsonvice.py -i - -o - \u003e output_test.json\n```\n\njsonvice can also beautify (pretty print) json, while still performing precision truncation.  Note this makes the file larger.\n\n```sh\njsonvice -i myfile.json -o output.json -p 3 -b\n```\n\n# Building and Source\n\nAll source is at [jsonvice](https://github.com/deftio/jsonvice)\n\njsonvice is built with Python using the Poetry packaging and build tool.\n\npip3 install poetry  # if not installed.\n\npoetry update\npoetry install\npoetry build\n\npoetry run jsonvice ...parameters...\n\nExample\n\n```sh\npoetry run jsonvice -i inputfile.json -o outputfile.json -p 4\n```\n\n\n\n# Installing as stand alone commandline tool\n\npip can be used into install jsonvice as stand alone tool (note python 3.6 should or later specified)\n```sh\npip install jsonvice\n```\n\n### pipx install\n\npipx can be used to install a stand alone version of jsonvice as a command line tool. Note pipx is like pip or pip3 but installs programs with their own virtual environment.\n\n```sh\npipx install jsonvice\n```\n\nor install from github repo \n\n```sh\npipx install git+https://github.com/deftio/jsonvice\n```\n\nNow you can use jsonvice at the commandline without typing python3 like this example:\n\n```sh\njsonvice -i inputfile.json -o - -b\n```\n\n## Python version support\n\nPython version 3.6 or higher is required to build jsonvice.  If pipx is used for install isolation takes place automatically.\n\n# Testing\n\nBoth pytest and tox were used to build jsonvice.  Testing can be performed at the command line via either tool:\n\n```sh\npoetry run pytest\n```\nor\n```sh\ntox\n```\n\n# History \u0026 Motivation\n\njson vice started as a script to compactify / minify some large machine learning model files which had large floating point numbers.   By rounding to fixed number of sig digits and then testing the models against testsuites to see the effects of truncation.\n\nAt the time couldn't find a tool and whipped up small script (the original script is in /dev directory).\n\nSo jsonvice was built to learn / test practices around the python poetry and pipx tools, for use in other projects, but starting with a small example cli program that already worked.  \n\n# License\n\njsonvice uses the BSD-2 open source license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeftio%2Fjsonvice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeftio%2Fjsonvice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeftio%2Fjsonvice/lists"}