diff --git a/ch05/ex5.7.md b/ch05/ex5.7.md new file mode 100644 index 0000000..76cdb7d --- /dev/null +++ b/ch05/ex5.7.md @@ -0,0 +1,25 @@ +# Printing Complex Data Types + +## Example + +```dart +import 'dart:convert'; + +void main() { + // Create JSON value + Map data = { + jsonEncode('title'): json.encode('Star Wars'), + jsonEncode('year'): json.encode(1979) + }; + + // Decode the JSON + Map items = json.decode(data.toString()); + + print(items); + print(items['title']); + print("This is the title: $items['title']"); + print('This is the title: ${items['title']}'); +} + + +```