I didn’t test it myself, but after reading the code, I think the format of the JSON should be similar to this:
{
"topics": [
{
"id": 1,
"title": "The title",
"pinned": false,
"posts": [
{
"id": 2,
"body": "The body",
"date": "The date",
"author": "username"
}
]
}
]
}