Skip to content

Commit

Permalink
v2.5.10
Browse files Browse the repository at this point in the history
- Fix typo.
  • Loading branch information
gmpassos committed Aug 16, 2020
1 parent 7609e0b commit 531e597
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.5.10

- Fix typo.

## 2.5.9

- `MimeType`: Added `charset`.
Expand Down
12 changes: 6 additions & 6 deletions lib/src/json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ dynamic parseJSON(dynamic json, [dynamic def]) {

/// Encodes [json].
String encodeJSON(dynamic json,
{String ident, bool withIdent, bool clearNullEntries}) {
{String indent, bool withIndent, bool clearNullEntries}) {
clearNullEntries ??= false;
if (clearNullEntries) {
removeNullEntries(json);
}

if (withIdent != null && withIdent) {
if (ident == null || ident.isEmpty) {
ident = ' ';
if (withIndent != null && withIndent) {
if (indent == null || indent.isEmpty) {
indent = ' ';
}
}

dart_convert.JsonEncoder encoder;

if (ident != null && ident.isNotEmpty) {
encoder = dart_convert.JsonEncoder.withIndent(ident);
if (indent != null && indent.isNotEmpty) {
encoder = dart_convert.JsonEncoder.withIndent(indent);
} else {
encoder = dart_convert.JsonEncoder();
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: swiss_knife
description: Dart Useful Tools - collections, math, date, uri, json, events, resources, regexp, etc...
version: 2.5.9
version: 2.5.10
homepage: https://github.com/gmpassos/swiss_knife

environment:
Expand Down

0 comments on commit 531e597

Please sign in to comment.