Note: This is an opinionated question. I m asking this as I was unable to find proper articles covering my concern.

PHP (alone or with a framework like laravel) can be used for both backend and frontend (with templating engines like Blade,Smarty,etc) development.

My concern is:

1. Is it good to use templating engine and create views in PHP?
2. Use PHP just as a backend tech and create APIs, let the frontend be built in any other language (like Angular,React,etc) chosen by the front end developer.
3. If I use templating-engine, is my application getting too tightly coupled between frontend tech choices and backend tech choices?

PS: I hope my concern is clear, if not I will explain it in an elaborated way.
['https://Stackoverflow.com/questions/40522008', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5193722/']
The Error clearly states that the Gson accepts `JsonObject` not `JsonArray`. In your case you can put the response `JsonArray` into a `JsonObject` with a key for that `JsonArray` and give that key as `annotation` in `SurvivorZAMQuestionList`. By this way you can easily sort this problem.

Hope this is Helpful :)
Do a gradle dependency of gson.

```
compile 'com.google.code.gson:gson:2.4'   

```

Update code like this;

```
 private void parseJSON(String jsonMessage) throws JSONException {
            if (jsonMessage.startsWith("[")) {
                Type type = new TypeToken<List<SurvivorZAMQuestionnaire>>() 
                }.getType();
                List<SurvivorZAMQuestionnaire> survivorZAMQuestionnaireList =new Gson().fromJson
                        (jsonMessage, type);
                Log.d("Print List",survivorZAMQuestionnaireList.toString());
            }

        }

```