Skip to content
PluginStats

Json2Dart Safe Convert downloads statistics

By windows7lake · JetBrains Marketplace · Code Tools

json2dart Description It's a flutter plugin that use for parsing json to dart class with safe type convert. What it do It will generate a dart file named...

View on JetBrains Marketplace Fresh · Oct 23, 2026

Json2Dart Safe Convert has 16,740 recorded downloads on JetBrains Marketplace, a change of +0.0% over the past 7 days, ranking #2339 of 2,502 tracked listings.

Downloads
16,740
Official API · Oct 23, 2026
7-day growth
+0.0%
+6 downloads
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#2339
▼ 6 in 7 days

Rating: 5.00 / 5 from 2 ratings

About Json2Dart Safe Convert

json2dart

Description

It's a flutter plugin that use for parsing json to dart class with safe type convert.

What it do

It will generate a dart file named "safe_convert.dart" to ensure dart object can be converted to correct type, if failed, it will get a default value.

For example, when you need a int type, but the server offer you a String type. It will auto convert String to int and make sure that, when convert failed, it has a default value such as '0'.

safe_convert.dart

int toInt(value, {int defaultValue = 0}) { if (value == null) return defaultValue; if (value is int) return value; if (value is double) return value.toInt(); if (value is bool) return value ? 1 : 0; if (value is String) { return int.tryParse(value) ?? double.tryParse(value)?.toInt() ?? defaultValue; } return defaultValue; }

double toDouble(value, {double defaultValue = 0.0}) { if (value == null) return defaultValue; if (value is double) return value; if (value is int) return value.toDouble(); if (value is bool) return value ? 1.0 : 0.0; if (value is String) return double.tryParse(value) ?? defaultValue; return defaultValue; }

bool toBool(value, {bool defaultValue = false}) { if (value == null) return defaultValue; if (value is bool) return value; if (value is int) return value == 0 ? false : true; if (value is double) return value == 0 ? false : true; if (value is String) { if (value == "1" || value.totoLowerCase() == "true") return true; if (value == "0" || value.totoLowerCase() == "false") return false; } return defaultValue; }

String toString(value, {String defaultValue = ""}) { if (value == null) return defaultValue; if (value is String) return value; if (value is int) return value.toString(); if (value is double) return value.toString(); if (value is bool) return value ? "true" : "false"; return defaultValue; }

Map<String, dynamic> toMap(value, {Map<String, dynamic>? defaultValue}) { if (value == null) return defaultValue ?? <String, dynamic>{}; if (value is Map<String, dynamic>) return value; return defaultValue ?? <String, dynamic>{}; }

List toList(value, {List? defaultValue}) { if (value == null) return defaultValue ?? []; if (value is List) return value; return defaultValue ?? []; }

int asInt(Map<String, dynamic>? json, String key, {int defaultValue = 0}) { if (json == null || !json.containsKey(key)) return defaultValue; return toInt(json[key]); }

double asDouble(Map<String, dynamic>? json, String key, {double defaultValue = 0.0}) { if (json == null || !json.containsKey(key)) return defaultValue; return toDouble(json[key]); }

bool asBool(Map<String, dynamic>? json, String key, {bool defaultValue = false}) { if (json == null || !json.containsKey(key)) return defaultValue; return toBool(json[key]); }

String asString(Map<String, dynamic>? json, String key, {String defaultValue = ""}) { if (json == null || !json.containsKey(key)) return defaultValue; return toString(json[key]); }

Map<String, dynamic> asMap(Map<String, dynamic>? json, String key, {Map<String, dynamic>? defaultValue}) { if (json == null || !json.containsKey(key)) { return defaultValue ?? <String, dynamic>{}; } return toMap(json[key]); }

List asList(Map<String, dynamic>? json, String key, {List? defaultValue}) { if (json == null || !json.containsKey(key)) return defaultValue ?? []; return toList(json[key]); }

List<int> asListInt(Map<String, dynamic>? json, String key, {List? defaultValue}) { return asList(json, key, defaultValue: defaultValue) .map((e) => toInt(e)) .toList(); }

List<String> asListString(Map<String, dynamic>? json, String key, {List? defaultValue}) { return asList(json, key, defaultValue: defaultValue) .map((e) => toString(e)) .toList(); }

T asT<T>(Map<String, dynamic>? json, String key, {T? defaultValue}) { if (json == null || !json.containsKey(key)) { if (defaultValue != null) return defaultValue; if (0 is T) return 0 as T; if (0.0 is T) return 0.0 as T; if ('' is T) return '' as T; if (false is T) return false as T; if ([] is T) return [] as T; if (<String, dynamic>{} is T) return <String, dynamic>{} as T; return '' as T; } dynamic value = json[key]; if (value is T) return value;

if (0 is T) { return toInt(value, defaultValue: (defaultValue ?? 0) as int) as T; } else if (0.0 is T) { return toDouble(value, defaultValue: (defaultValue ?? 0.0) as double) as T; } else if ('' is T) { return toString(value, defaultValue: (defaultValue ?? '') as String) as T; } else if (false is T) { return toBool(value, defaultValue: (defaultValue ?? false) as bool) as T; } else if ([] is T) { return toList(value, defaultValue: (defaultValue ?? []) as List) as T; } else if (<String, dynamic>{} is T) { Object defaultV = defaultValue ?? <String, dynamic>{}; return toMap(value, defaultValue: defaultV as Map<String, dynamic>) as T; } return '' as T; }

Features

• final property • null safety • fromJson and toJson method • copyWith method • use generic

Example

Example 1: without using generic

class Response { final int intValue; final double doubleValue; final bool boolValue; final String stringValue; final KeyData keyData; final List<String> stringData;

Response({ this.intValue = 0, this.doubleValue = 0.0, this.boolValue = false, this.stringValue = "", required this.keyData, required this.stringData, });

factory Response.fromJson(Map<String, dynamic>? json) => Response( intValue: asInt(json, 'int_value'), doubleValue: asDouble(json, 'double_value'), boolValue: asBool(json, 'bool_value'), stringValue: asString(json, 'string_value'), keyData: KeyData.fromJson(asMap(json, 'key_data')), stringData: asList(json, 'string_data').map((e) => e.toString()).toList(), );

Map<String, dynamic> toJson() => { 'int_value': intValue, 'double_value': doubleValue, 'bool_value': boolValue, 'string_value': stringValue, 'key_data': keyData.toJson(), 'string_data': stringData.map((e) => e).toList(), }; }

Example 2: using generic…

Description from the JetBrains Marketplace listing.

  • Code Tools

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

Json2Dart Safe Convert downloads on JetBrains Marketplace, last 90 days: 16,740 downloads as of Oct 23, 2026.Json2Dart Safe ConvertDownloads on JetBrains Marketplace · Last 90 days16,740downloads16.7K16.7K16.7K16.7K16.7K16.7K16.7KJul 25Aug 9Aug 24Sep 8Sep 23Oct 8Oct 23downloadsobservedarchived (Internet Archive)no observationsOct 16, 2026 – Oct 23, 2026 · 8 observations · Updated Oct…pluginstats.com
Json2Dart Safe Convert downloads on JetBrains Marketplace, last 90 days: 16,740 downloads as of Oct 23, 2026.

7/30/90-day growth

Json2Dart Safe Convert downloads growth on JetBrains Marketplace: +0.0% over 7 days, 30-day growth unavailable, 90-day growth unavailable.Json2Dart Safe ConvertDownloads growth on JetBrains Marketplace16,740downloads now7-day growth+6 downloads · approx.+0.0%30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Oct 23, 2026pluginstats.com
Json2Dart Safe Convert downloads growth on JetBrains Marketplace: +0.0% over 7 days, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

Json2Dart Safe Convert JetBrains Marketplace ranking history: currently #2339 (by downloads).Json2Dart Safe ConvertJetBrains Marketplace ranking · by downloads · Last 90 days#2339current rank#2330#2332#2334#2336#2338#2340#2342Jul 25Aug 9Aug 24Sep 8Sep 23Oct 8Oct 23rankOct 16, 2026 – Oct 23, 2026 · 8 observations · Updated Oct 23, 2026pluginstats.com
Json2Dart Safe Convert JetBrains Marketplace ranking history: currently #2339 (by downloads).

Ratings over time

Json2Dart Safe Convert ratings on JetBrains Marketplace, last 90 days: 2 ratings as of Oct 23, 2026.Json2Dart Safe ConvertRatings on JetBrains Marketplace · Last 90 days2ratings1.81.922.12.2Jul 25Aug 9Aug 24Sep 8Sep 23Oct 8Oct 23ratingsobservedarchived (Internet Archive)no observationsOct 16, 2026 – Oct 23, 2026 · 8 observations · Updated Oct…pluginstats.com
Json2Dart Safe Convert ratings on JetBrains Marketplace, last 90 days: 2 ratings as of Oct 23, 2026.

Listing placement

All JetBrains Marketplace2,502 listings · 126 pages · 1,252 shown · page 117, #19 (overall #2,339)
All JetBrains Marketplace: every listing in downloads order

Listing placement

Code Tools484 listings · 25 pages · page 23, #10 (overall #450)
Code Tools: every listing in downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Downloads on a linear scale. Placement is projected from downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (8)
Recent downloads observations for Json2Dart Safe Convert
Date (UTC)DownloadsChange vs. previous
16,7400
16,7400
16,740+3
16,737+1
16,7360
16,7360
16,736+2
16,734—

Similar JetBrains Marketplace Code Tools plugins

All 20 Json2Dart Safe Convert alternatives

Data source

Cumulative download counts come from the public JetBrains Marketplace API. JetBrains reports downloads, not active installs. Ratings are the mean of public votes.

Listing: https://plugins.jetbrains.com/plugin/14921-json2dart-safe-convert. First seen Oct 16, 2026; last successful collection Oct 23, 2026. See the methodology.