fromJson static method

Vector fromJson(
  1. dynamic value
)

Returns a serialized version of the Vector with values serialized.

Implementation

static Vector fromJson(dynamic value) {
  if (value is Uint8List) return Vector.fromBinary(value);
  if (value is String) return _fromString(value);
  if (value is List) return Vector(value.cast<double>());
  if (value is Vector) return value;

  throw DeserializationTypeNotFoundException(type: value.runtimeType);
}