Skip to content

Instantly share code, notes, and snippets.

@bsutton
Last active February 29, 2020 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsutton/b893a1644beaeb4ffec69848ae40b75d to your computer and use it in GitHub Desktop.
Save bsutton/b893a1644beaeb4ffec69848ae40b75d to your computer and use it in GitHub Desktop.
Convert to json
#! /usr/bin/env dshell
import 'dart:convert';
import 'package:dshell/dshell.dart';
void main() {
var json =
'wget -qO- https://jsonplaceholder.typicode.com/todos/1'.toJson();
print('Title: ${json["title"]}');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment