code: function (key, instance, serializer) {
      var value = serializer.serialize(instance);
      if (key !== undefined) {
          return "\"" + key + "\":" + value;
      }
      else {
          return value;
      }
  }
docs: Serialize any type with key value pairs