You can then simply send the JSON response to the client.
Process the JSON response - and everyone's happy.
The image on the left is a simplified example of the JSON response.
The contents of the JSON response vary depending on the state of the subscription, as shown in the following snippets.
El contenido de la respuesta de JSON varía en función del estado de la suscripción, tal como se muestra en los siguientes fragmentos.
This method is used to send a JSON response.
Este método se utiliza para enviar una respuesta JSON.
This is a dot-notated expression that navigates via fields of the JSON response.
Es una expresión con notación de puntos que navega a través de los campos de la respuesta JSON.
If it's valid, you'll get a JSON response like this
Si es válida, obtendrás una respuesta JSON como la siguiente
If not supplied, the default JSON response will be used. fields
Si no se indica, se usará la respuesta JSON predeterminada. fields
Note that the JSON response contains two root elements
Ten en cuenta que una respuesta JSON contiene dos elementos principales
and decode the JSON response from the server to get the transaction id
y decodifica la respuesta JSON del servidor para obtener el identificador de la transacción
Note that this response is considerably longer than the JSON response.
Ten en cuenta que esta respuesta es considerablemente más extensa que la respuesta JSON.
If the user is logged in to the site, it will return a JSON response of the user's information.
Si el usuario está logueado en el sitio, retornará una respuesta JSON de su información.
If you want the server to return a JSON response instead, you will have to change the default exception handling behavior.
Si deseas que el servidor devuelva una respuesta JSON en su lugar, tendrás que cambiar el comportamiento de manejo de excepciones predeterminado.