handling JSON objects

PR for 'handle JSON objectts' issue.