Add JSON support - Thanks @eduardolundgren