add json flag to package.json code snippet