0

I'm using JSON from Rob Sanchez, it's working fine.

The template create a file, but what is the solution for the template save the file with a json extension instead of .html or .js ??

1
  • Stupid question. Is not a flat file, so it's saves as html format. I've just installed VL File Generator, but i've contacted the author because it's not working. Would be nice if EE could save directly data in json format. – Stéphane May 22 '14 at 3:57
2

I'm not completely understand your issue (for template route ext. is not really matter - you can made it as you want), but possible is that you have text/html header instead of application/json?

If yes, try to add terminate="yes" parameter to JSON plugin:

{exp:json:entries channel="news" terminate="yes"} 
2
  • I was tired, so the answer was confused. Thanks for your response!!! – Stéphane May 22 '14 at 13:09
  • I believed that the unique solution was to create a JSON flat file via a script, or a module. Using the JSON plugin that produce a page works too when it's called with http get. – Stéphane May 22 '14 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.