Adding JSON functionality