added unapply for json data