This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Diego Oriani
Posted Feb 17 - Read on Facebook

I am getting the following error trying to load a JSON file in FramerJS — SyntaxError: Unexpected token ':'. Parse error.

http://share.framerjs.com/14fjt5n1hlac/

Have anyone come across this as well?

7 Comments

Marc Krenn

There's a new Utils.-function to load JSON files:
'Utils.domLoadJSONSync("path")'

http://share.framerjs.com/xe6xdb9m9axo/ :)

Diego Oriani

I see. Thanks Marc Krenn :D

Jordan Robert Dobson

Nice. I missed the new function as well.

Diego Oriani

Marc, where did you find that function? I cannot find in the docs. Is it a JavaScript function?

Diego Oriani

Thanks for the link.

Koen Bok

Also, some API's require you to use a CORS proxy to work: https://crossorigin.me/

Diego Oriani

That's good to know. I am still struggling to access the JSON file properly. For some reason I cannot retrieve the data inside a loop. Any ideas why? I can print values outside the loop but not inside - http://share.framerjs.com/pd97e2g3dywo/

Read the entire post on Facebook