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. Commented May 22, 2014 at 3:57

1 Answer 1

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!!! Commented May 22, 2014 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. Commented May 22, 2014 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.