employing json encoder to handle unicode