Skip to content

Can toJson() functionality be included as well? #1801

Open
@thosakwe

Description

@thosakwe

It's fantastic to have an official package on Pub for parsing and extracting data from a pubspec.

There is, however, one thing, I'm wondering - would it be bad for createToJson to be true for the models contained in this package?

I'm working on updating the Angel CLI, which uses the old package:pubspec to persist changes to the project files (namely, adding dependencies the user is missing), to pubspec_parse, and if there were some way to just get a toJson method on the PubSpec.

I'll gladly send a PR, but is there is a specific reason this functionality isn't present already? I imagine there's probably a reason I didn't think about.

Metadata

Metadata

Labels

good first issueA good starting issue for contributors (issues with this label will appear in /contribute)package:pubspec_parsetype-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions