Fix JSON serialization in ObjectLookupView

Thanks to @vovanbo for reporting and supplying a fix.

Fixes #1169.