reverting failing type declarations for parseJSON and toJSON