Fixed issue serialising unnamed JSON objects.