json_compressor 1.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 45

json_compressor

provides a transformer that compresses json files

Usage

json_compressor provides two parameters: 'debugMode' and 'prodMode', both are optional.

dev_dependencies:
  json_compressor: ^1.0.0
transformers:
- json_compressor:
    debugMode: indent1
    prodMode: no_indent

possible values (for both)

  • off: don't change the json files (this is also the fallback, if an illegal value was provided)
  • single_row: compress json file to a singleline version without spaces or newlines
  • no_indent: compress json file to a multiline version without indentation/spaces
  • indent1: compress json file to a multiline version with one space indentation per level
  • indent2: compress json file to a multiline version with two spaces indentation per level
  • indent4: compress json file to a multiline version with four spaces indentation per level

default values

  • debugMode: no_indent
  • prodMode: single_row

Changelog

1.0.0

  • Initial version with a functional json compressing transformer

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  json_compressor: "^1.0.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:json_compressor/transformer.dart';
        
Version Uploaded Documentation Archive
1.0.0 Feb 5, 2017 Go to the documentation of json_compressor 1.0.0 Download json_compressor 1.0.0 archive

Analysis

We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
96 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
79 / 100
Overall score:
Weighted score of the above. [more]
45
Learn more about scoring.

Platforms

Detected platforms: Flutter, other

Platform components identified in package: build, io, isolate.

Suggestions

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use json_compressor.dart.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 hints.

    Run dartfmt to format lib/transformer.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.12.0 <2.0.0
barback ^0.15.2+9 0.15.2+15
Transitive dependencies
async 2.0.6
charcode 1.1.1
collection 1.14.9
path 1.5.1
pool 1.3.4
source_span 1.4.0
stack_trace 1.9.2