Added automatic conversion array to JSON.