More work on handling JSON