Cookies.getJSON is not a function
See original GitHub issueI just got your library from Bower (2.1.*) and included the JS file.
With the following code:
closedAlerts = Cookies.getJSON 'closed_alerts'
I get Cookies.getJSON is not a function error.
This code works:
closedAlerts = JSON.parse Cookies.get 'closed_alerts'
I check the vendor JS file and the getJSON is right here. Already had this issue?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:15 (8 by maintainers)
Top Results From Across the Web
JQuery issue "TypeError: $.getJSON is not a function"
You seem to be using slim version of jquery which does not have the method getJSON thats why you are getting this error....
Read more >js_cookie__WEBPACK_IMPORT...
Running into the following error when trying to build a Next.js app: TypeError: js_cookie__WEBPACK_IMPORTED_MODULE_2__.default.getJSON is not a function ...
Read more >A simple, lightweight JavaScript API for handling cookies
getJSON = function () { return api.apply({ json: true }, [].slice.call(arguments)); } ... We're using "expires" because "max-age" is not supported by IE ......
Read more >Uncaught TypeError: jQuery.getJSON is not a function
I have been following this guide on how to populate the graph with JSON from backend using .getJSON but i keep getting “Uncaught...
Read more >TypeError: $.getJSON is not a function in jQuery | bobbyhadz
To solve the "$.getJSON is not a function" jQuery error, make sure to load the full version of the jQuery library. The slim...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

My bad @carhartl I was referring to old docs for v2—https://www.npmjs.com/package/js-cookie
Curious why it was removed? Security concerns?
@evictor
In v3 all built-in functionality related to handling json has been removed (it‘s mentioned in the release notes for the first beta).
Could you point me to where this is still documented, I can‘t seem to find it?