My Json is:

```
{
    "objects":{
        "apple":[
            {"x":3, "y":5},
            {"x":6, "y":9}
        ],
        "car":[
            {"x":7, "y":9},
            {"x":5, "y":8}
        ]
     }
 }

```

```java
import com.badlogic.gdx.utils.Json;
import java.util.ArrayList;
import java.util.HashMap;

public class ClassA{
    public Integer x, y;
}

public class ClassB{
    public HashMap<String, ArrayList<ClassA>> objects; 
}

public static void main(String[] args) {
    Json json = new Json();

    ClassB classB = json.fromJson(ClassB.class, "{\n" +
            "            \"objects\":{\n" +
            "                \"apple\":[\n" +
            "                    {\"x\":3, \"y\":5},\n" +
            "                    {\"x\":6, \"y\":9}\n" +
            "                ],\n" +
            "                \"car\":[\n" +
            "                    {\"x\":7, \"y\":9},\n" +
            "                    {\"x\":5, \"y\":8}\n" +
            "                ]\n" +
            "            }\n" +
            "        }");

    System.out.println(json.toJson(classB));
}

```

I use "Libgdx", "json.fromJson" is works fine and when i call "json.toJson(classB)" an exception throws:

```java
Exception in thread "main" java.lang.StackOverflowError
at com.badlogic.gdx.utils.JsonWriter$OutputType.quoteValue(JsonWriter.java:187)
at com.badlogic.gdx.utils.JsonWriter.value(JsonWriter.java:88)
at com.badlogic.gdx.utils.Json.writeValue(Json.java:574)
at com.badlogic.gdx.utils.Json.writeFields(Json.java:290)
at com.badlogic.gdx.utils.Json.writeValue(Json.java:580)
at com.badlogic.gdx.utils.Json.writeFields(Json.java:290)
at com.badlogic.gdx.utils.Json.writeValue(Json.java:580)
...

```

When i change **"ArrayList"** to **String(etc)** from **HashMap** in **ClassB** the code works fine.

So why an exception is thowing when i use "ArrayList" and how can i parse my json to ClassB instance?