Added list encoding to array and hash-table encoding to a JSON object.