Moved functions for parsing a JSON packet to the new packet class.