added a generic name-value pair case class
added JSON support