PropertyDescriptor.fromJson constructor

PropertyDescriptor.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory PropertyDescriptor.fromJson(Map<String, dynamic> json) {
  return PropertyDescriptor(
    name: json['name'] as String,
    value: json.containsKey('value')
        ? RemoteObject.fromJson(json['value'] as Map<String, dynamic>)
        : null,
    writable: json.containsKey('writable') ? json['writable'] as bool : null,
    get: json.containsKey('get')
        ? RemoteObject.fromJson(json['get'] as Map<String, dynamic>)
        : null,
    set: json.containsKey('set')
        ? RemoteObject.fromJson(json['set'] as Map<String, dynamic>)
        : null,
    configurable: json['configurable'] as bool? ?? false,
    enumerable: json['enumerable'] as bool? ?? false,
    wasThrown:
        json.containsKey('wasThrown') ? json['wasThrown'] as bool : null,
    isOwn: json.containsKey('isOwn') ? json['isOwn'] as bool : null,
    symbol: json.containsKey('symbol')
        ? RemoteObject.fromJson(json['symbol'] as Map<String, dynamic>)
        : null,
  );
}