ckan

Cannot parse json in ckanapi


Im trying to use ckanapi but i have an error everytime i tried to use this command:

**ckanapi action package_create_default_resource_views {"create_datastore_views":true} **

KEY:JSON argument '{create_datastore_views' has invalid JSON value 'true}'

https://docs.ckan.org/en/2.10/api/#ckan.logic.action.create.package_create_default_resource_views

It may be a syntax problem, but the documentation does not make it clear to me how to use the command correctly Any ideas? Ty


Solution

  • Yep, only a syntax problem, i forgot the double quotes:

    **ckanapi action package_create_default_resource_views {"create_datastore_views": "true"} **