Refactored creation of sublist annotations. (closes #132)

Using json_encode we solve the escape issue and have less lines. Only
difference is that the annotation variables are now object and not
arrays. But that makes no difference.
Merge pull request #332 from ServiusHack/issue/132

Refactored creation of sublist annotations. (closes #132)