code: function (metadata) {
      if (typeof metadata === 'string') {
          return getJsonPropertyDecorator({ name: metadata, required: false, access: exports.AccessType.BOTH });
      }
      else {
          return getJsonPropertyDecorator(metadata);
      }
  }
docs: JsonProperty Decorator function.