Move package.json into JS source directory
Add Resource.serialize method