dart-lang / yaml

A Dart YAML parser.
https://pub.dev/packages/yaml
MIT License
169 stars 58 forks source link

Updated README.md #119

Closed 0xAdityaSingh closed 2 years ago

0xAdityaSingh commented 2 years ago

import 'dart:io'; import 'package:path/path.dart'; import 'package:yaml/yaml.dart';

void main() { String pathToYaml = join(dirname(Platform.script.toFilePath()), '../pubspec.yaml'); File f = new File(pathToYaml); String yamlText = f.readAsStringSync(); // print(yamlText); Map yaml = loadYaml(yamlText) as Map; Map _yaml = yaml['dependencies'] as Map; _yaml.forEach((k, v) => print('$k: $v')); // printing subsets and this is without comments. }

google-cla[bot] commented 2 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.