unarchive static method

KeyedArchive unarchive(
  1. Map<String, dynamic> data, {
  2. bool allowReferences = false,
})

Unarchives data into a KeyedArchive that can be used by Coding.decode to deserialize objects.

Each Map in data (including data itself) is converted to a KeyedArchive. Each List in data is converted to a ListArchive. These conversions occur for deeply nested maps and lists.

If allowReferences is true, JSON Schema references will be traversed and decoded objects will contain values from the referenced object. This flag defaults to false.

Implementation

static KeyedArchive unarchive(Map<String, dynamic> data,
    {bool allowReferences: false}) {
  final archive = new KeyedArchive(data);
  if (allowReferences) {
    archive.resolveOrThrow(new ReferenceResolver(archive));
  }
  return archive;
}