ServingConfig.fromJson constructor

ServingConfig.fromJson(
  1. Map _json
)

Implementation

ServingConfig.fromJson(core.Map _json)
    : this(
        appAssociation: _json.containsKey('appAssociation')
            ? _json['appAssociation'] as core.String
            : null,
        cleanUrls: _json.containsKey('cleanUrls')
            ? _json['cleanUrls'] as core.bool
            : null,
        headers: _json.containsKey('headers')
            ? (_json['headers'] as core.List)
                .map((value) => Header.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        i18n: _json.containsKey('i18n')
            ? I18nConfig.fromJson(
                _json['i18n'] as core.Map<core.String, core.dynamic>)
            : null,
        redirects: _json.containsKey('redirects')
            ? (_json['redirects'] as core.List)
                .map((value) => Redirect.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        rewrites: _json.containsKey('rewrites')
            ? (_json['rewrites'] as core.List)
                .map((value) => Rewrite.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        trailingSlashBehavior: _json.containsKey('trailingSlashBehavior')
            ? _json['trailingSlashBehavior'] as core.String
            : null,
      );