frictionlessdata / datapackage-java

A Java library for working with Frictionless Data Data Packages.
MIT License
20 stars 7 forks source link

Package class constructor should create a instance with template #21

Closed jackyq2015 closed 3 years ago

jackyq2015 commented 6 years ago

The Package() constructor with empty argument should take a template json file and fill in the jsonObject field instead of leave it empty. So user can fill in the value against the key from template instead of creating a blank instance user cannot use.

iSnow commented 3 years ago

No-args constructor has been removed as it has led to an invalid package.

The desired functionality can mostly be achieve by using the Package(String jsonStringSource, Path basePath, boolean strict) constructor to read in a "template" datapackage and removing the resources.