Skip Navigation

[Resuelto] Get Views output as JSON

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
Can Views be used to output a valid JSON string?

Solution:
No, not a native way.

What you can do is applay a Custom Filter to render a raw View's Loop.
Then, in the Loop, you can use JSON format.

This is the function you need:
https://toolset.com/forums/topic/views-not-working-after-installing-v1-11/#post-345294

One more for reference:
https://toolset.com/forums/topic/error-using-cred_generic_field-to-let-user-select-the-post-author/#post-346275

A user also acheived this by another Plugin:
https://wordpress.org/plugins/views-output-formats/

This support ticket is created hace 7 años, 8 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Etiquetado: ,

This topic contains 2 respuestas, has 2 mensajes.

Last updated by Hector hace 7 años, 8 meses.

Assisted by: Beda.

Autor
Mensajes
#424717

Hi,

Is there a way to output Views as JSON? I see there is a question in this forum asking this same question in 2013, has it become available since then?

Many thanks

#424738

No, not a native way.

What you can do is applay a Custom Filter to render a raw View's Loop.
Then, in the Loop, you can use JSON format.

This is the function you need:
https://toolset.com/forums/topic/views-not-working-after-installing-v1-11/#post-345294

One more for reference:
https://toolset.com/forums/topic/error-using-cred_generic_field-to-let-user-select-the-post-author/#post-346275

Let me know if I can help you with other Toolset Supported Features.

#425132

Thanks Beda.

I found this plugin which seems to do the trick:

https://wordpress.org/plugins/views-output-formats/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.